Commit 1ec97e51 by bergquist

feat(playlist): shortens urls

parent 458d1506
...@@ -176,8 +176,8 @@ func Register(r *macaron.Macaron) { ...@@ -176,8 +176,8 @@ func Register(r *macaron.Macaron) {
r.Group("/playlists", func() { r.Group("/playlists", func() {
r.Get("/", wrap(SearchPlaylists)) r.Get("/", wrap(SearchPlaylists))
r.Get("/:id", ValidateOrgPlaylist, wrap(GetPlaylist)) r.Get("/:id", ValidateOrgPlaylist, wrap(GetPlaylist))
r.Get("/:id/playlistitems", ValidateOrgPlaylist, wrap(GetPlaylistItems)) r.Get("/:id/items", ValidateOrgPlaylist, wrap(GetPlaylistItems))
r.Get("/:id/playlistdashboards", ValidateOrgPlaylist, wrap(GetPlaylistDashboards)) r.Get("/:id/dashboards", ValidateOrgPlaylist, wrap(GetPlaylistDashboards))
r.Delete("/:id", reqEditorRole, ValidateOrgPlaylist, wrap(DeletePlaylist)) r.Delete("/:id", reqEditorRole, ValidateOrgPlaylist, wrap(DeletePlaylist))
r.Put("/:id", reqEditorRole, bind(m.UpdatePlaylistQuery{}), ValidateOrgPlaylist, wrap(UpdatePlaylist)) r.Put("/:id", reqEditorRole, bind(m.UpdatePlaylistQuery{}), ValidateOrgPlaylist, wrap(UpdatePlaylist))
r.Post("/", reqEditorRole, bind(m.CreatePlaylistQuery{}), wrap(CreatePlaylist)) r.Post("/", reqEditorRole, bind(m.CreatePlaylistQuery{}), wrap(CreatePlaylist))
......
...@@ -25,7 +25,7 @@ function (angular, config, _) { ...@@ -25,7 +25,7 @@ function (angular, config, _) {
$scope.playlist = result; $scope.playlist = result;
}); });
backendSrv.get('/api/playlists/' + playlistId + '/playlistitems') backendSrv.get('/api/playlists/' + playlistId + '/items')
.then(function(result) { .then(function(result) {
$scope.playlistItems = result; $scope.playlistItems = result;
}); });
......
...@@ -31,7 +31,7 @@ function (angular) { ...@@ -31,7 +31,7 @@ function (angular) {
return backendSrv.get('/api/playlists/' + playlistId) return backendSrv.get('/api/playlists/' + playlistId)
.then(function(playlist) { .then(function(playlist) {
return backendSrv.get('/api/playlists/' + playlistId + '/playlistdashboards') return backendSrv.get('/api/playlists/' + playlistId + '/dashboards')
.then(function(dashboards) { .then(function(dashboards) {
playlistSrv.start(dashboards, playlist.timespan); playlistSrv.start(dashboards, playlist.timespan);
}); });
......
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