Use profile based password reset from profile page

This commit is contained in:
Johannes Zellner
2021-10-28 18:45:54 +02:00
parent 6cc9d610f1
commit 0daf926740
2 changed files with 11 additions and 2 deletions

View File

@@ -1882,6 +1882,15 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.sendSelfPasswordReset = function (identifier, callback) {
post('/api/v1/cloudron/password_reset_request', { identifier }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
callback(null, data);
});
};
Client.prototype.getInviteLink = function (userId, callback) {
get('/api/v1/users/' + userId + '/invite_link', null, function (error, data, status) {
if (error) return callback(error);