feat(playlist): changes to relation table

Also introduces an abstraction between playlist and dashboard.
This will make it possible to att search, and tag filtering to
playlists without any major refactoring
This commit is contained in:
bergquist
2016-01-08 17:32:55 +01:00
parent 0ea01f24a8
commit 8a38991270
6 changed files with 246 additions and 64 deletions

View File

@@ -176,7 +176,7 @@ func Register(r *macaron.Macaron) {
r.Group("/playlists", func() {
r.Get("/", wrap(SearchPlaylists))
r.Get("/:id", ValidateOrgPlaylist, wrap(GetPlaylist))
r.Get("/:id/dashboards", ValidateOrgPlaylist, wrap(GetPlaylistDashboards))
r.Get("/:id/playlistitems", ValidateOrgPlaylist, wrap(GetPlaylistItems))
r.Delete("/:id", reqEditorRole, ValidateOrgPlaylist, wrap(DeletePlaylist))
r.Put("/:id", reqEditorRole, bind(m.UpdatePlaylistQuery{}), ValidateOrgPlaylist, wrap(UpdatePlaylist))
r.Post("/", reqEditorRole, bind(m.CreatePlaylistQuery{}), wrap(CreatePlaylist))