2017-03-12 16:24:15 +00:00
|
|
|
angular.module('portainer.rest')
|
2017-07-20 14:22:27 +00:00
|
|
|
.factory('ResourceControl', ['$resource', 'API_ENDPOINT_RESOURCE_CONTROLS', function ResourceControlFactory($resource, API_ENDPOINT_RESOURCE_CONTROLS) {
|
2017-03-12 16:24:15 +00:00
|
|
|
'use strict';
|
2017-07-20 14:22:27 +00:00
|
|
|
return $resource(API_ENDPOINT_RESOURCE_CONTROLS + '/:id', {}, {
|
2017-05-23 18:56:10 +00:00
|
|
|
create: { method: 'POST' },
|
|
|
|
get: { method: 'GET', params: { id: '@id' } },
|
|
|
|
update: { method: 'PUT', params: { id: '@id' } },
|
|
|
|
remove: { method: 'DELETE', params: { id: '@id'} }
|
2017-03-12 16:24:15 +00:00
|
|
|
});
|
|
|
|
}]);
|