ffffng/app/scripts/services/nodeService.js
2014-05-12 20:08:19 +02:00

19 lines
426 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);
},
'getNode': function (token) {
return $http.get('/api/node/' + token);
}
};
});