Files
platform/web/router.go
2025-03-28 15:01:30 +08:00

22 lines
449 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", PermitUser())
channel.Post("/create", handlers.CreateChannel)
}