mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-13 22:05:21 +01:00
24 lines
513 B
JavaScript
24 lines
513 B
JavaScript
|
(function() {
|
||
|
|
||
|
'use strict';
|
||
|
|
||
|
angular
|
||
|
.module('harbor.services.user')
|
||
|
.factory('UpdateUserService', UpdateUserService);
|
||
|
|
||
|
UpdateUserService.$inject = ['$http'];
|
||
|
|
||
|
function UpdateUserService($http) {
|
||
|
return updateUser;
|
||
|
function updateUser(userId, user) {
|
||
|
return $http
|
||
|
.put('/api/users/' + userId, {
|
||
|
'username': user.username,
|
||
|
'email': user.email,
|
||
|
'realname': user.realname,
|
||
|
'comment': user.comment
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
})();
|