Removed playlist item when dashboard is deleted
This commit is contained in:
1 parent
bd996a4810
commit
c737704eeb
2 files changed
+13
No files matched your search
@@ -26,6 +26,18 @@ func ValidateOrgPlaylist(c *middleware.Context) {
|
||||
c.JsonApiErr(403, "You are not allowed to edit/view playlist", nil)
|
||||
return
|
||||
}
|
||||
|
||||
items, itemsErr := LoadPlaylistItemDTOs(id)
|
||||
|
||||
if itemsErr != nil {
|
||||
c.JsonApiErr(404, "Playlist items not found", err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(items) == 0 {
|
||||
c.JsonApiErr(404, "Playlist is empty", itemsErr)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func SearchPlaylists(c *middleware.Context) Response {
|
||||
|
||||
Reference in new issue
Block a user