fix: improve user deletion process and session handling
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 29s
This commit is contained in:
+3
-2
@@ -167,8 +167,9 @@ router.post('/player/:username/delete', requireAuth, (req, res) => {
|
||||
}
|
||||
|
||||
Users.deleteUser(user.id);
|
||||
req.session.destroy();
|
||||
res.redirect('/');
|
||||
req.session.destroy(() => {
|
||||
res.redirect('/');
|
||||
});
|
||||
});
|
||||
|
||||
// ─── Browse all hunts ─────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user