Switched to CoffeeScript string interpolation

This commit is contained in:
Josef Citrine 2016-05-04 21:47:05 +01:00
parent 2a7e774df5
commit a46a66f230

View file

@ -23,7 +23,8 @@ module.exports = angular.module('ponyfm').factory('track-stats', [
loadStats: (id) ->
return def if def
def = new $.Deferred()
$http.get('/api/web/tracks/' + id + '/stats').success (stats) ->
url = "/api/web/tracks/#{ id }/stats"
$http.get(url).success (stats) ->
def.resolve stats
def.promise()