ffffng/app/scripts/services/nodeService.js

23 lines
534 B
JavaScript
Raw Normal View History

2014-05-12 20:08:19 +02:00
'use strict';
angular.module('ffffng')
.service('NodeService', function ($http) {
return {
'createNode': function (node) {
return $http.post('/api/node', node);
},
'updateNode': function (node, token) {
return $http.put('/api/node/' + token, node);
},
2016-05-16 18:27:03 +02:00
'deleteNode': function (token) {
return $http.delete('/api/node/' + token);
},
2014-05-12 20:08:19 +02:00
'getNode': function (token) {
return $http.get('/api/node/' + token);
}
};
});