mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(global): service separation #552
This commit is contained in:
parent
0abe8883d1
commit
fe0bf77bbb
48 changed files with 1029 additions and 1015 deletions
13
app/rest/endpoint.js
Normal file
13
app/rest/endpoint.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Endpoints', ['$resource', 'ENDPOINTS_ENDPOINT', function EndpointsFactory($resource, ENDPOINTS_ENDPOINT) {
|
||||
'use strict';
|
||||
return $resource(ENDPOINTS_ENDPOINT + '/:id/:action', {}, {
|
||||
create: { method: 'POST' },
|
||||
query: { method: 'GET', isArray: true },
|
||||
get: { method: 'GET', params: { id: '@id' } },
|
||||
update: { method: 'PUT', params: { id: '@id' } },
|
||||
remove: { method: 'DELETE', params: { id: '@id'} },
|
||||
getActiveEndpoint: { method: 'GET', params: { id: '0' } },
|
||||
setActiveEndpoint: { method: 'POST', params: { id: '@id', action: 'active' } }
|
||||
});
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue