This commit is contained in:
Jay
2018-04-30 10:13:01 +08:00
parent 1b8416dba3
commit e33c51727a
4 changed files with 106 additions and 1 deletions
+4
View File
@@ -55,4 +55,8 @@ func SetDefaultRoutes(r *gin.Engine) {
albumAPI.PUT("/:id", context.PatchContext(album.UpdateAlbum))
albumAPI.DELETE("/:id", context.PatchContext(album.DeleteAlbum))
}
photoAPI := albumAPI.Group("/:album/photo", context.PatchContext(middleware.VerifyToken), context.PatchContext(middleware.GetAlbumToNext))
{
photoAPI.GET("/", context.PatchContext(album.GetPhoto))
}
}