Add password reset action to profile page

This commit is contained in:
Johannes Zellner
2021-09-09 22:24:35 +02:00
parent d4ffba86a6
commit 04eb179899
3 changed files with 27 additions and 1 deletions
+13
View File
@@ -1844,6 +1844,19 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
});
};
Client.prototype.sendPasswordReset = function (callback) {
var data = {
identifier: this._userInfo.email
};
post('/api/v1/cloudron/password_reset_request', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));
callback(null);
});
};
Client.prototype.setTwoFactorAuthenticationSecret = function (callback) {
var data = {};