Init Commit: After finish database connection.
This commit is contained in:
23
router/router.go
Normal file
23
router/router.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package router
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
func SetupRouter() *gin.Engine {
|
||||
r := gin.Default()
|
||||
api := r.Group("/api")
|
||||
{
|
||||
v1 := api.Group("/v1")
|
||||
{
|
||||
auth := v1.Group("/auth")
|
||||
{
|
||||
auth.POST("/login", func(context *gin.Context) {
|
||||
context.JSON(200, gin.H{
|
||||
"msg": "Login successfully",
|
||||
})
|
||||
})
|
||||
auth.POST("/register")
|
||||
}
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
||||
Reference in New Issue
Block a user