1234567891011121314151617181920212223 |
- package routers
- import (
- "Ic_ouath/app/controller"
- middleware "Ic_ouath/app/middlewares"
- "github.com/gin-gonic/gin"
- )
- func UserRouter(r *gin.Engine) {
- group := r.Group("/api")
- group.POST("/user", controller.PhoneRegist)
- group.POST("/sendcode", controller.SendCode)
- group.POST("/login", controller.Login)
- group.POST("/codelogin", controller.CodeLogin)
- group.POST("/updatepassword", controller.UpdatePassword)
- adminGroup := r.Group("/api/admin")
- adminGroup.Use(middleware.Authentication())
- adminGroup.POST("/getalluser", controller.GetUserAlls)
- adminGroup.POST("/user", controller.UpdateUserById)
- adminGroup.DELETE("/user", controller.DeleteUserById)
- }
|