完善登录与鉴权机制
This commit is contained in:
@@ -11,14 +11,10 @@ func ApplyRouters(app *fiber.App) {
|
||||
|
||||
// 认证
|
||||
auth := api.Group("/auth")
|
||||
auth.Post("/verify/sms", PermitUser(), handlers.SmsCode)
|
||||
auth.Post("/login/sms", PermitUser(), handlers.Login)
|
||||
auth.Post("/verify/sms", PermitDevice(), handlers.SmsCode)
|
||||
auth.Post("/login/sms", PermitDevice(), 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)
|
||||
|
||||
Reference in New Issue
Block a user