dev stock stragety
This commit is contained in:
@@ -4,13 +4,32 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"git.apinb.com/senlinai/site/internal/logic"
|
||||
"git.apinb.com/senlinai/cloud/internal/logic"
|
||||
"git.apinb.com/senlinai/cloud/internal/logic/apps"
|
||||
"git.apinb.com/senlinai/cloud/internal/logic/auth"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Register public 注册路由
|
||||
func RegistersPublic(engine *gin.Engine) {
|
||||
engine.GET("/", logic.Index)
|
||||
|
||||
// 匿名访问接口
|
||||
engine.GET("/sign-in", auth.SignIn) // 登录
|
||||
engine.POST("/login", auth.Login)
|
||||
engine.GET("/logout", auth.Logout) // 退出登录
|
||||
|
||||
registerCenter("apps", engine)
|
||||
}
|
||||
|
||||
func registerCenter(v1_key string, engine *gin.Engine) {
|
||||
center := engine.Group(v1_key)
|
||||
|
||||
// Session认证
|
||||
// center.Use(middleware.CheckSession())
|
||||
|
||||
center.GET("/home", apps.Home) // 首页概况
|
||||
|
||||
}
|
||||
|
||||
func RegistersAll(engine *gin.Engine) {
|
||||
|
||||
Reference in New Issue
Block a user