🎨 完善部分用户相关接口
This commit is contained in:
9
router/user/enter.go
Normal file
9
router/user/enter.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
api "git.echol.cn/loser/lckt/api/v1"
|
||||
)
|
||||
|
||||
type RouterGroup struct{ UserRouter }
|
||||
|
||||
var userApi = api.ApiGroupApp.UserApiGroup
|
23
router/user/user.go
Normal file
23
router/user/user.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/lckt/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type UserRouter struct{}
|
||||
|
||||
// InitUserRouter 初始化 用户相关 路由信息
|
||||
func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
|
||||
userRouter := Router.Group("app_user").Use(middleware.OperationRecord())
|
||||
userRouterWithoutAuth := PublicRouter.Group("app_user")
|
||||
{
|
||||
userRouter.GET("list", userApi.GetUserList) // 获取用户列表
|
||||
userRouter.PUT("setBalance", userApi.SetBalance) // 更新用户余额
|
||||
}
|
||||
{
|
||||
userRouterWithoutAuth.DELETE("login", userApi.Login) // 短信验证码登录
|
||||
userRouterWithoutAuth.POST("sms", userApi.SendCode) // 发送短信验证码
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user