Browse Source

refactor: update forgot password api response

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/894/head
Pranav C 3 years ago
parent
commit
f46e89b079
  1. 9
      packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts

9
packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts

@ -1001,10 +1001,7 @@ export default class RestAuthCtrl {
const email = _email.toLowerCase();
const user = await this.users.where({ email }).first();
if (!user) {
return next(new Error('This email is not registered with us.'));
}
if (user) {
const token = uuidv4();
await this.users
.update({
@ -1038,8 +1035,8 @@ export default class RestAuthCtrl {
description: `requested for password reset `,
ip: req.clientIp
});
res.json({ msg: 'Check your email for password reset link.' });
}
res.json({ msg: 'Check your email if you are registered with us.' });
}
protected async tokenValidate(req, res, next): Promise<any> {

Loading…
Cancel
Save