You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/rest/user.js

16 lines
763 B

angular.module('portainer.rest')
.factory('Users', ['$resource', 'USERS_ENDPOINT', function UsersFactory($resource, USERS_ENDPOINT) {
'use strict';
return $resource(USERS_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'} },
// RPCs should be moved to a specific endpoint
checkPassword: { method: 'POST', params: { id: '@id', action: 'passwd' } },
checkAdminUser: { method: 'GET', params: { id: 'admin', action: 'check' }, isArray: true },
initAdminUser: { method: 'POST', params: { id: 'admin', action: 'init' } }
});
}]);