u
This commit is contained in:
1 parent
f08db1959b
commit
c6671c8a8c
68 files changed
+13904
-1131
No files matched your search
@@ -1,22 +1,14 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"allapp-go/pkg/logger"
|
||||
"allapp-go/internal/handle"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
|
||||
func Setup(app *fiber.App) {
|
||||
// 健康检查
|
||||
app.Get("/ping", func(c fiber.Ctx) error {
|
||||
log := logger.FromCtx(c)
|
||||
|
||||
log.Info("测试")
|
||||
|
||||
return c.SendString("pong")
|
||||
})
|
||||
|
||||
// 你后面可以这样分组:
|
||||
// setupUserRoutes(app)
|
||||
// setupOrderRoutes(app)
|
||||
func SetupRouter(app *fiber.App) {
|
||||
// ==================== data ====================
|
||||
app.Post("/data/loadData", handle.LoadData)
|
||||
app.Post("/data/loadDataBySql", handle.LoadDataBySql)
|
||||
app.Post("/data/saveData", handle.SaveData)
|
||||
}
|
||||
Reference in new issue
Block a user