u
This commit is contained in:
1 parent
1903861354
commit
1b1a54f7dd
35 files changed
+1185
-535
No files matched your search
@@ -2,6 +2,8 @@ package router
|
||||
|
||||
import (
|
||||
"allapp/api/handler/auth"
|
||||
"allapp/api/handler/space"
|
||||
"allapp/api/router/middleware"
|
||||
"allapp/config"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
@@ -14,7 +16,7 @@ func SetupRouters(app *fiber.App) {
|
||||
publicGroup := api.Group("")
|
||||
|
||||
// 2️⃣ 需要登录
|
||||
//authGroup := api.Group("", middleware.Auth())
|
||||
authGroup := api.Group("", middleware.Auth())
|
||||
//
|
||||
//// 3️⃣ 需要登录 + 需要空间
|
||||
//spaceGroup := api.Group("", middleware.Auth(), middleware.SpaceGuard())
|
||||
@@ -25,7 +27,8 @@ func SetupRouters(app *fiber.App) {
|
||||
authRouter.Post("/login/qq", auth.LoginQq)
|
||||
authRouter.Post("/login/wechat", auth.LoginWechat)
|
||||
|
||||
// 示例
|
||||
// 空间操作
|
||||
authGroup.Post("/space/create", space.CreateSpace)
|
||||
// authGroup.Get("/user/profile", user.GetProfile)
|
||||
// spaceGroup.Get("/space/info", space.GetInfo)
|
||||
}
|
||||
Reference in new issue
Block a user