0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2024-12-22 05:02:58 -05:00

Add root message

This commit is contained in:
dragongoose 2023-05-25 21:04:15 -04:00
parent d6d820cdc1
commit 75b9075564
No known key found for this signature in database
GPG key ID: 50DB99B921579009
2 changed files with 17 additions and 0 deletions

15
routes/root/root.go Normal file
View file

@ -0,0 +1,15 @@
package root
import (
"safetwitch-backend/extractor"
"github.com/gin-gonic/gin"
)
func Routes(route *gin.Engine) {
auth := route.Group("/")
auth.GET("/", func(context *gin.Context) {
context.JSON(200, extractor.FormatMessage("SafeTwitch backend running", true))
})
}

View file

@ -2,6 +2,7 @@ package routes
import (
"safetwitch-backend/routes/proxy"
"safetwitch-backend/routes/root"
"safetwitch-backend/routes/users"
"github.com/gin-gonic/gin"
@ -10,4 +11,5 @@ import (
func SetRoutes(router *gin.Engine) {
users.Routes(router)
proxy.Routes(router)
root.Routes(router)
}