mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
blehh
This commit is contained in:
@@ -18,12 +18,12 @@ const isAuthenticated = (req, res, next) => {
|
||||
} else {
|
||||
const delSession = req.session.destroy((err) => {
|
||||
if (err) {
|
||||
res.sendStatus(500);
|
||||
res.status(500).send({ message: "Internal Server Error" });
|
||||
logger.error("session.destroy", { err });
|
||||
return;
|
||||
} else {
|
||||
res.clearCookie(sessionName);
|
||||
res.sendStatus(401);
|
||||
res.status(401).send({ message: "Unauthorized" });
|
||||
logger.debug("Session invalid, destroyed.", { sessionID: delSession.id });
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user