u
This commit is contained in:
1 parent
8a3dea8545
commit
1903861354
21 files changed
+335
-236
No files matched your search
@@ -10,13 +10,22 @@ import (
|
||||
func SetupRouters(app *fiber.App) {
|
||||
api := app.Group(config.GetConf().Server.BaseUrl)
|
||||
|
||||
public := api.Group("")
|
||||
//private := api.Group("", middleware.Auth())
|
||||
// 1️⃣ 公开接口(无需登录)
|
||||
publicGroup := api.Group("")
|
||||
|
||||
// 2️⃣ 需要登录
|
||||
//authGroup := api.Group("", middleware.Auth())
|
||||
//
|
||||
//// 3️⃣ 需要登录 + 需要空间
|
||||
//spaceGroup := api.Group("", middleware.Auth(), middleware.SpaceGuard())
|
||||
|
||||
// --------------------
|
||||
// auth
|
||||
authRouter := public.Group("/auth")
|
||||
authRouter := publicGroup.Group("/auth")
|
||||
authRouter.Post("/login/qq", auth.LoginQq)
|
||||
authRouter.Post("/login/wechat", auth.LoginWechat)
|
||||
|
||||
// 其他的都带中间件
|
||||
// 示例
|
||||
// authGroup.Get("/user/profile", user.GetProfile)
|
||||
// spaceGroup.Get("/space/info", space.GetInfo)
|
||||
}
|
||||
Reference in new issue
Block a user