2023-11-02 04:34:46 +08:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
v1 "miniapp/api/v1"
|
|
|
|
"miniapp/middleware"
|
|
|
|
)
|
|
|
|
|
|
|
|
type UserRouter struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *LoginRouter) InitUserRouter(Router *gin.RouterGroup) {
|
|
|
|
userRouter := Router.Group("user").Use(middleware.AuthorizeToken())
|
|
|
|
//publicRouter := Router.Group("user")
|
|
|
|
baseApi := v1.ApiGroupApp.AppApiGroup.UserApi
|
|
|
|
filrApi := v1.ApiGroupApp.ExampleApiGroup.FileUploadAndDownloadApi
|
|
|
|
todoApi := v1.ApiGroupApp.AppApiGroup.TodosApi
|
|
|
|
{
|
|
|
|
userRouter.POST("upload", filrApi.UploadFile)
|
|
|
|
userRouter.POST("binding/wechat", baseApi.BindingWeChat)
|
|
|
|
userRouter.PUT("info", baseApi.UpdateUser)
|
|
|
|
userRouter.GET("info", baseApi.GetInfo)
|
|
|
|
userRouter.PUT("hospital", baseApi.UpdateUserHospital)
|
|
|
|
userRouter.GET("", baseApi.GetUser)
|
|
|
|
userRouter.GET("todo", todoApi.GetUserTodos)
|
|
|
|
userRouter.PUT("todo", todoApi.UpdateTodo)
|
2024-04-26 13:23:20 +08:00
|
|
|
userRouter.GET("todo/today", todoApi.GetTodayTodos)
|
2024-03-21 21:08:45 +08:00
|
|
|
userRouter.POST("msg", baseApi.SendMedicineRemind)
|
2023-11-02 04:34:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|