snippet/gin/router.go

27 lines
400 B
Go
Raw Normal View History

2021-12-03 03:36:40 +00:00
package gin
import (
"github.com/gin-gonic/gin"
)
//路由配置
func routerSetup(router *gin.Engine) {
router.Use(gin.Recovery())
router.GET(`/health/check`)
r := router.Group(`/user`)
{
r.POST(`/register`)
r.GET(`/accountcheck/:accname`)
r.POST(`/login`)
r.POST(`/forgot`)
}
ug := router.Group(`/user`)
{
ug.GET(`/choose/:orgid`)
ug.GET(`/detail`)
ug.POST(`/update`)
}
}