Browse Source

fix: compare date after converting to date

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2672/head
Pranav C 2 years ago
parent
commit
57a53f6062
  1. 2
      packages/nocodb/src/lib/meta/api/userApi/userApis.ts

2
packages/nocodb/src/lib/meta/api/userApi/userApis.ts

@ -365,7 +365,7 @@ async function tokenValidate(req, res): Promise<any> {
if (!user || !user.email) {
NcError.badRequest('Invalid reset url');
}
if (user.reset_password_expires < new Date()) {
if (new Date(user.reset_password_expires) < new Date()) {
NcError.badRequest('Password reset url expired');
}
res.json(true);

Loading…
Cancel
Save