mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Fixed something
This commit is contained in:
parent
a2063c9de1
commit
3c561903c7
1 changed files with 7 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
angular.module('ponyfm').factory('playlists', [
|
||||
'$rootScope', '$state', '$http'
|
||||
($rootScope, $state, $http) ->
|
||||
'$rootScope', '$state', '$http', 'auth'
|
||||
($rootScope, $state, $http, auth) ->
|
||||
playlistDef = null
|
||||
playlists = {}
|
||||
playlistPages = []
|
||||
|
@ -49,10 +49,11 @@ angular.module('ponyfm').factory('playlists', [
|
|||
def
|
||||
|
||||
refresh: () ->
|
||||
$.getJSON('/api/web/playlists/pinned')
|
||||
.done (playlists) -> $rootScope.$apply ->
|
||||
self.pinnedPlaylists.length = 0
|
||||
self.pinnedPlaylists.push playlist for playlist in playlists
|
||||
if auth.data.isLogged
|
||||
$.getJSON('/api/web/playlists/pinned')
|
||||
.done (playlists) -> $rootScope.$apply ->
|
||||
self.pinnedPlaylists.length = 0
|
||||
self.pinnedPlaylists.push playlist for playlist in playlists
|
||||
|
||||
deletePlaylist: (playlist) ->
|
||||
def = new $.Deferred()
|
||||
|
|
Loading…
Reference in a new issue