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:
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 (
|
||||
"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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue