ffffng/app/scripts/services/monitoringService.js

21 lines
565 B
JavaScript
Raw Normal View History

'use strict';
angular.module('ffffng')
.service('MonitoringService', function ($http, $q) {
return {
'confirm': function (mac, token) {
if (!mac || !token) {
return $q.reject({});
}
return $http.put('/api/monitoring/confirm/' + mac + '?token=' + token);
2016-05-18 23:15:43 +02:00
},
'disable': function (mac, token) {
if (!mac || !token) {
return $q.reject({});
}
return $http.put('/api/monitoring/disable/' + mac + '?token=' + token);
}
};
});