Commit 00dc0783 by bergquist

feat(playlist): render playlists if playlist id is invalid

close #4209
parent 62b21c58
......@@ -17,6 +17,11 @@ func ValidateOrgPlaylist(c *middleware.Context) {
return
}
if query.Result.OrgId == 0 {
c.JsonApiErr(404, "Playlist not found", err)
return
}
if query.Result.OrgId != c.OrgId {
c.JsonApiErr(403, "You are not allowed to edit/view playlist", nil)
return
......
......@@ -26,6 +26,9 @@ function (angular) {
controller : 'PlaylistEditCtrl'
})
.when('/playlists/play/:id', {
templateUrl: 'public/app/features/playlist/partials/playlists.html',
controllerAs: 'ctrl',
controller : 'PlaylistsCtrl',
resolve: {
init: function(playlistSrv, $route) {
var playlistId = $route.current.params.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment