22 lines
440 B
Go
22 lines
440 B
Go
package web
|
|
|
|
import (
|
|
"platform/web/handlers"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
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)
|
|
|
|
// 客户端路由
|
|
client := api.Group("/client")
|
|
client.Get("/test/create", handlers.CreateClient)
|
|
}
|