feat: resetPasswordRequest use more params
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
30a25664de
commit
7651dcb473
|
@ -19,7 +19,7 @@ module.exports = Self => {
|
|||
const models = Self.app.models;
|
||||
|
||||
try {
|
||||
await models.user.resetPassword({email});
|
||||
await models.user.resetPassword({email, emailTemplate: 'recover-password'});
|
||||
} catch (err) {
|
||||
if (err.code === 'EMAIL_NOT_FOUND')
|
||||
return;
|
||||
|
|
|
@ -16,7 +16,11 @@ module.exports = function(Self) {
|
|||
url: `${origin}/#!/reset-password?access_token=${info.accessToken.id}`
|
||||
};
|
||||
|
||||
const email = new Email('recover-password', params);
|
||||
const options = Object.assign({}, info.options);
|
||||
for (const param in options)
|
||||
params[param] = options[param];
|
||||
|
||||
const email = new Email(options.emailTemplate, params);
|
||||
|
||||
return email.send();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue