changes...
This commit is contained in:
parent
41944884b4
commit
ab4b53fd40
26 changed files with 600 additions and 51 deletions
|
|
@ -18,3 +18,15 @@ func BindPostAdmin(service *services.PostService, group *gin.RouterGroup) {
|
|||
g.PUT("/:id", post.Put)
|
||||
g.DELETE("/:id", post.Delete)
|
||||
}
|
||||
|
||||
func BindUser(service *services.UserService, group *gin.RouterGroup) {
|
||||
user := controllers.CreateUserController(service)
|
||||
|
||||
g := group.Group("/user/")
|
||||
g.POST("/", user.Post)
|
||||
g.GET("/", user.GetAll)
|
||||
g.GET("/:id", user.FindById)
|
||||
g.GET("/name/:name", user.FindByName)
|
||||
g.PUT("/:id", user.Put)
|
||||
g.DELETE("/:id", user.Delete)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue