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