mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 17:17:46 +01:00
25 lines
538 B
JavaScript
25 lines
538 B
JavaScript
(function() {
|
|
|
|
'use strict';
|
|
|
|
angular
|
|
.module('harbor.services.user')
|
|
.factory('ChangePasswordService', ChangePasswordService);
|
|
|
|
ChangePasswordService.$inject = ['$http', '$log'];
|
|
|
|
function ChangePasswordService($http, $log) {
|
|
|
|
return ChangePassword;
|
|
|
|
function ChangePassword(userId, oldPassword, newPassword) {
|
|
return $http
|
|
.put('/api/users/' + userId + '/password', {
|
|
'old_password': oldPassword,
|
|
'new_password': newPassword
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
})(); |