package web import ( "platform/web/handlers" "platform/web/services" "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", Permit([]services.PayloadType{ services.PayloadClientConfidential, services.PayloadClientPublic, services.PayloadUser, services.PayloadAdmin, }), handlers.CreateChannel) }