27 lines
604 B
Go
27 lines
604 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", PermitDevice(), handlers.SmsCode)
|
|
auth.Post("/login/sms", PermitDevice(), handlers.Login)
|
|
auth.Post("/token", handlers.Token)
|
|
|
|
// 通道
|
|
channel := api.Group("/channel")
|
|
channel.Post("/create", PermitAll(), handlers.CreateChannel)
|
|
channel.Post("/remove", PermitAll(), handlers.RemoveChannels)
|
|
|
|
// 临时
|
|
app.Get("/collect", handlers.CreateChannelGet)
|
|
app.Get("/temp", handlers.Temp)
|
|
}
|