2021-12-03 03:36:40 +00:00
|
|
|
package gin
|
|
|
|
|
|
|
|
|
|
import (
|
2021-12-03 06:00:37 +00:00
|
|
|
"fmt"
|
|
|
|
|
|
2021-12-03 03:36:40 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
2023-09-13 09:27:25 +00:00
|
|
|
// 路由配置
|
2021-12-03 06:00:37 +00:00
|
|
|
func routerSetup(router *gin.Engine, rootpath *string) {
|
2021-12-03 03:36:40 +00:00
|
|
|
router.Use(gin.Recovery())
|
|
|
|
|
router.GET(`/health/check`)
|
|
|
|
|
|
2021-12-03 06:00:37 +00:00
|
|
|
r := router.Group(fmt.Sprintf("/%s", *rootpath))
|
2021-12-03 03:36:40 +00:00
|
|
|
{
|
|
|
|
|
r.POST(`/register`)
|
|
|
|
|
r.GET(`/accountcheck/:accname`)
|
|
|
|
|
r.POST(`/login`)
|
|
|
|
|
r.POST(`/forgot`)
|
|
|
|
|
}
|
|
|
|
|
}
|