mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-04 08:03:37 +01:00
22 lines
376 B
JavaScript
22 lines
376 B
JavaScript
|
(function() {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
angular
|
||
|
.module('harbor.services.user')
|
||
|
.factory('ToggleAdminService', ToggleAdminService);
|
||
|
|
||
|
ToggleAdminService.$inject = ['$http'];
|
||
|
|
||
|
function ToggleAdminService($http) {
|
||
|
|
||
|
return toggleAdmin;
|
||
|
|
||
|
function toggleAdmin(userId) {
|
||
|
return $http
|
||
|
.put('/api/users/' + userId);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
})();
|