mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 22:19:28 -04:00
(bugfix) object passed to invalidateAuthenticator instead of its id
This commit is contained in:
parent
976e6f1851
commit
59d46662dd
@ -468,7 +468,7 @@ router.post('/user/validate', handleErrorAsync(async (req, res) => {
|
||||
return res.json({ error: 'user.code.invalid' });
|
||||
}
|
||||
|
||||
await invalidateAuthenticator(req.db, authenticator);
|
||||
await invalidateAuthenticator(req.db, authenticator.id);
|
||||
|
||||
await auditLog(req, 'auth/validate_code_valid');
|
||||
|
||||
@ -549,7 +549,7 @@ router.post('/user/change-email', handleErrorAsync(async (req, res) => {
|
||||
return res.json({ error: 'user.code.invalid' });
|
||||
}
|
||||
|
||||
await invalidateAuthenticator(req.db, authenticator);
|
||||
await invalidateAuthenticator(req.db, authenticator.id);
|
||||
|
||||
await req.db.get(SQL`UPDATE users SET email = ${authenticator.payload.to} WHERE id = ${req.user.id}`);
|
||||
req.user.email = authenticator.payload.to;
|
||||
|
Loading…
x
Reference in New Issue
Block a user