2014-05-12 20:08:19 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-05-18 22:50:06 +02:00
|
|
|
angular.module('ffffng').factory('Router', function (app, NodeResource, MonitoringResource) {
|
2014-05-12 20:08:19 +02:00
|
|
|
return {
|
|
|
|
init: function () {
|
|
|
|
app.post('/api/node', NodeResource.create);
|
|
|
|
app.put('/api/node/:token', NodeResource.update);
|
2016-05-16 18:27:03 +02:00
|
|
|
app.delete('/api/node/:token', NodeResource.delete);
|
2014-05-12 20:08:19 +02:00
|
|
|
app.get('/api/node/:token', NodeResource.get);
|
2016-05-18 22:50:06 +02:00
|
|
|
|
2016-05-23 22:36:27 +02:00
|
|
|
app.put('/api/monitoring/confirm/:token', MonitoringResource.confirm);
|
|
|
|
app.put('/api/monitoring/disable/:token', MonitoringResource.disable);
|
2014-05-12 20:08:19 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
});
|