2016-05-18 22:50:06 +02:00
|
|
|
'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);
|
2016-05-18 22:50:06 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|