1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

feat(secrets): add secret management (#894)

This commit is contained in:
Anthony Lapenna 2017-05-27 09:23:49 +02:00 committed by GitHub
parent 128601bb58
commit 42d28db47a
21 changed files with 730 additions and 27 deletions

12
app/rest/secret.js Normal file
View file

@ -0,0 +1,12 @@
angular.module('portainer.rest')
.factory('Secret', ['$resource', 'Settings', 'EndpointProvider', function SecretFactory($resource, Settings, EndpointProvider) {
'use strict';
return $resource(Settings.url + '/:endpointId/secrets/:id/:action', {
endpointId: EndpointProvider.endpointID
}, {
get: { method: 'GET', params: {id: '@id'} },
query: { method: 'GET', isArray: true },
create: { method: 'POST', params: {action: 'create'} },
remove: { method: 'DELETE', params: {id: '@id'} }
});
}]);