harbor/static/ng/resources/js/services/user/services.toggle-admin.js

22 lines
376 B
JavaScript
Raw Normal View History

(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);
}
}
})();