26 lines
543 B
Go
26 lines
543 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", PermitUser(), handlers.SmsCode)
|
|
auth.Post("/login/sms", PermitUser(), handlers.Login)
|
|
auth.Post("/token", handlers.Token)
|
|
|
|
// 客户端
|
|
client := api.Group("/client")
|
|
client.Get("/test/create", handlers.CreateClient)
|
|
|
|
// 通道
|
|
channel := api.Group("/channel", PermitUser())
|
|
channel.Post("/create", handlers.CreateChannel)
|
|
}
|