ffffng/app/scripts/services/monitoringService.js

21 lines
503 B
JavaScript
Raw Normal View History

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