Files
platform/web/router.go

22 lines
440 B
Go
Raw Normal View History

2025-03-15 16:07:45 +08:00
package web
2025-03-18 10:13:57 +08:00
import (
2025-03-18 17:57:07 +08:00
"platform/web/handlers"
2025-03-18 10:13:57 +08:00
"github.com/gofiber/fiber/v2"
)
2025-03-15 16:07:45 +08:00
2025-03-18 17:57:07 +08:00
func ApplyRouters(app *fiber.App) {
api := app.Group("/api")
// 认证路由
auth := api.Group("/auth")
auth.Post("/verify/sms", Protect(), handlers.SmsCode)
auth.Post("/login/sms", Protect(), handlers.Login)
auth.Post("/token", handlers.Token)
2025-03-15 16:07:45 +08:00
2025-03-18 17:57:07 +08:00
// 客户端路由
client := api.Group("/client")
client.Get("/test/create", handlers.CreateClient)
2025-03-15 16:07:45 +08:00
}