22 lines
534 B
JavaScript
22 lines
534 B
JavaScript
'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);
|
|
},
|
|
|
|
'deleteNode': function (token) {
|
|
return $http.delete('/api/node/' + token);
|
|
},
|
|
|
|
'getNode': function (token) {
|
|
return $http.get('/api/node/' + token);
|
|
}
|
|
};
|
|
});
|