mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-27 15:27:58 +01:00
14 lines
343 B
CoffeeScript
14 lines
343 B
CoffeeScript
|
angular.module('ponyfm').controller "dashboard", [
|
||
|
'$scope'
|
||
|
($scope) ->
|
||
|
$scope.recentTracks = null
|
||
|
$scope.popularTracks = null
|
||
|
|
||
|
$scope.refresh = () ->
|
||
|
$.getJSON('/api/web/dashboard')
|
||
|
.done (res) -> $scope.$apply ->
|
||
|
$scope.recentTracks = res.recent_tracks
|
||
|
$scope.popularTracks = res.popular_tracks
|
||
|
|
||
|
$scope.refresh()
|
||
|
]
|