Plain password reset for a user
This commit is contained in:
@@ -1845,16 +1845,12 @@ 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) {
|
||||
Client.prototype.sendPasswordReset = 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);
|
||||
callback(null, data);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user