This commit is contained in:
Jay
2018-04-25 15:50:45 +08:00
parent 8c83ceb9ea
commit 2b17fa04be
5 changed files with 152 additions and 18 deletions
+2
View File
@@ -50,6 +50,8 @@ func SetDefaultRoutes(r *gin.Engine) {
api.GET("/albums", context.PatchContext(middleware.VerifyToken), context.PatchContext(album.GetAllAlbums))
albumAPI := api.Group("/album", context.PatchContext(middleware.VerifyToken))
{
albumAPI.POST("/", context.PatchContext(album.CreateAlbum))
albumAPI.GET("/:id", context.PatchContext(album.GetAlbum))
albumAPI.PUT("/:id", context.PatchContext(album.UpdateAlbum))
}
}