mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: do primary read of user after setting email_confirmed
This commit is contained in:
parent
0519b4a71b
commit
ef245b70df
@ -70,7 +70,8 @@ router.post('/confirm-email', auth, express.json(), async (req, res, next)=>{
|
|||||||
"UPDATE `user` SET `email_confirmed` = 1, `requires_email_confirmation` = 0 WHERE id = ? LIMIT 1",
|
"UPDATE `user` SET `email_confirmed` = 1, `requires_email_confirmation` = 0 WHERE id = ? LIMIT 1",
|
||||||
[req.user.id],
|
[req.user.id],
|
||||||
);
|
);
|
||||||
invalidate_cached_user(req.user);
|
const svc_getUser = req.services.get('get-user');
|
||||||
|
await svc_getUser.get_user({ id: req.user.id, force: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build response object
|
// Build response object
|
||||||
|
Loading…
Reference in New Issue
Block a user