ffffng/app/scripts/services/monitoringService.js
2016-05-18 23:15:43 +02:00

20 lines
565 B
JavaScript

'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);
},
'disable': function (mac, token) {
if (!mac || !token) {
return $q.reject({});
}
return $http.put('/api/monitoring/disable/' + mac + '?token=' + token);
}
};
});