20260507213409
This commit is contained in:
1 parent
3070eac71b
commit
4c7f516a03
204 files changed
+3623
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"allapp-go/internal/config"
|
||||
"allapp-go/internal/handle"
|
||||
"allapp-go/internal/middleware"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
func SetupRouter(app *fiber.App, cfg *config.Config) {
|
||||
api := app.Group(cfg.App.BaseUrl)
|
||||
|
||||
// ==================== data ====================
|
||||
data := api.Group("/data", middleware.Auth())
|
||||
|
||||
data.Post("/loadData", handle.LoadData)
|
||||
data.Post("/loadDataBySql", handle.LoadDataBySql)
|
||||
data.Post("/saveData", handle.SaveData)
|
||||
data.Post("/getUniqueId", handle.GetUniqueId)
|
||||
|
||||
s3 := api.Group("/s3", middleware.Auth())
|
||||
s3.Post("/upload", handle.S3UploadFile)
|
||||
s3.Post("/delete", handle.S3DeleteFile)
|
||||
|
||||
// ==================== auth ====================
|
||||
api.Post("/auth/login/qq", handle.LoginQq)
|
||||
api.Post("/auth/login/wechat", handle.LoginWechat)
|
||||
|
||||
bind := api.Group("/bind", middleware.Auth())
|
||||
bind.Post("/qq", handle.BindQq)
|
||||
bind.Post("/wechat", handle.BindWechat)
|
||||
}
|
||||
Reference in new issue
Block a user