Files
platform/web/router.go

23 lines
511 B
Go
Raw Normal View History

2025-03-15 16:07:45 +08:00
package web
2025-03-18 10:13:57 +08:00
import (
2025-03-18 17:57:07 +08:00
"platform/web/handlers"
2025-03-18 10:13:57 +08:00
"github.com/gofiber/fiber/v2"
)
2025-03-15 16:07:45 +08:00
2025-03-18 17:57:07 +08:00
func ApplyRouters(app *fiber.App) {
api := app.Group("/api")
// 认证
2025-03-18 17:57:07 +08:00
auth := api.Group("/auth")
2025-03-28 15:01:30 +08:00
auth.Post("/verify/sms", PermitDevice(), handlers.SmsCode)
auth.Post("/login/sms", PermitDevice(), handlers.Login)
2025-03-18 17:57:07 +08:00
auth.Post("/token", handlers.Token)
2025-03-15 16:07:45 +08:00
// 通道
channel := api.Group("/channel")
channel.Post("/create", PermitAll(), handlers.CreateChannel)
channel.Post("/remove", PermitAll(), handlers.RemoveChannels)
2025-03-15 16:07:45 +08:00
}