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) userRouter.GET("todo/today", todoApi.GetTodayTodos) userRouter.POST("msg", baseApi.SendMedicineRemind) } }