🎨 set up routes
This commit is contained in:
10
router/modules/auth_router.go
Normal file
10
router/modules/auth_router.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package modules
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
func AuthRouter(router *gin.RouterGroup) {
|
||||
group := router.Group("auth")
|
||||
group.GET("/user", func(c *gin.Context) {
|
||||
|
||||
})
|
||||
}
|
15
router/router.go
Normal file
15
router/router.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"schisandra-cloud-album/global"
|
||||
"schisandra-cloud-album/router/modules"
|
||||
)
|
||||
|
||||
func InitRouter() *gin.Engine {
|
||||
gin.SetMode(global.CONFIG.System.Env)
|
||||
Router := gin.Default()
|
||||
PublicGroup := Router.Group("api")
|
||||
modules.AuthRouter(PublicGroup)
|
||||
return Router
|
||||
}
|
Reference in New Issue
Block a user