mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2025-01-18 02:12:28 -05:00
Add root message
This commit is contained in:
parent
d6d820cdc1
commit
75b9075564
2 changed files with 17 additions and 0 deletions
15
routes/root/root.go
Normal file
15
routes/root/root.go
Normal 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))
|
||||||
|
})
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"safetwitch-backend/routes/proxy"
|
"safetwitch-backend/routes/proxy"
|
||||||
|
"safetwitch-backend/routes/root"
|
||||||
"safetwitch-backend/routes/users"
|
"safetwitch-backend/routes/users"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
@ -10,4 +11,5 @@ import (
|
||||||
func SetRoutes(router *gin.Engine) {
|
func SetRoutes(router *gin.Engine) {
|
||||||
users.Routes(router)
|
users.Routes(router)
|
||||||
proxy.Routes(router)
|
proxy.Routes(router)
|
||||||
|
root.Routes(router)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue