mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 13:07:59 +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', [
|
angular.module('ponyfm').factory('playlists', [
|
||||||
'$rootScope', '$state', '$http'
|
'$rootScope', '$state', '$http', 'auth'
|
||||||
($rootScope, $state, $http) ->
|
($rootScope, $state, $http, auth) ->
|
||||||
playlistDef = null
|
playlistDef = null
|
||||||
playlists = {}
|
playlists = {}
|
||||||
playlistPages = []
|
playlistPages = []
|
||||||
|
@ -49,10 +49,11 @@ angular.module('ponyfm').factory('playlists', [
|
||||||
def
|
def
|
||||||
|
|
||||||
refresh: () ->
|
refresh: () ->
|
||||||
$.getJSON('/api/web/playlists/pinned')
|
if auth.data.isLogged
|
||||||
.done (playlists) -> $rootScope.$apply ->
|
$.getJSON('/api/web/playlists/pinned')
|
||||||
self.pinnedPlaylists.length = 0
|
.done (playlists) -> $rootScope.$apply ->
|
||||||
self.pinnedPlaylists.push playlist for playlist in playlists
|
self.pinnedPlaylists.length = 0
|
||||||
|
self.pinnedPlaylists.push playlist for playlist in playlists
|
||||||
|
|
||||||
deletePlaylist: (playlist) ->
|
deletePlaylist: (playlist) ->
|
||||||
def = new $.Deferred()
|
def = new $.Deferred()
|
||||||
|
|
Loading…
Reference in a new issue