Files
dss.web/client/app/models/mix.js
Fergal Moran d2c529bafe Screw you git!
2015-12-01 19:50:20 +00:00

19 lines
600 B
JavaScript
Executable File

angular.module('dssWebApp')
.factory('MixModel', function ($http, DS, SERVER_CONFIG) {
return DS.defineResource({
name: 'mix',
idAttribute: 'slug',
methods: {
getStreamUrl: function () {
return $http.get(SERVER_CONFIG.apiUrl + '/mix/' + this.slug + '/stream_url/');
},
addPlay: function (user) {
return $http.post(SERVER_CONFIG.apiUrl + '/_act/play' + '?id=' + this.slug);
}
}
});
})
.run(function (MixModel) {
});