mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-29 05:35:43 +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);
|
|
}
|
|
|
|
}
|
|
|
|
})(); |