Change password reset to have both link and email
This commit is contained in:
@@ -1873,8 +1873,17 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.sendPasswordReset = function (identifier, callback) {
|
||||
post('/api/v1/cloudron/password_reset_request', { identifier }, null, function (error, data, status) {
|
||||
Client.prototype.getPasswordResetLink = function (userId, callback) {
|
||||
get('/api/v1/users/' + userId + '/password_reset_link', null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 200) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null, data);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.sendPasswordResetEmail = function (userId, email, callback) {
|
||||
post('/api/v1/users/' + userId + '/send_password_reset_email', { email }, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 202) return callback(new ClientError(status, data));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user