ffffng/app/scripts/services/monitoringService.js

23 lines
607 B
JavaScript
Raw Normal View History

'use strict';
angular.module('ffffng')
.service('MonitoringService', function ($http, $q, config) {
var pathPrefix = config.rootPath === '/' ? '' : config.rootPath;
return {
2016-05-23 22:36:27 +02:00
'confirm': function (token) {
if (!token) {
return $q.reject({});
}
return $http.put(pathPrefix + '/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({});
}
return $http.put(pathPrefix + '/api/monitoring/disable/' + token);
}
};
});