mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
back to redis (gotta cache API calls)
This commit is contained in:
@@ -16,10 +16,10 @@ const isAuthenticated = (req, res, next) => {
|
||||
};
|
||||
next();
|
||||
} else {
|
||||
const delSession = req.session.destroy((err) => {
|
||||
if (err) {
|
||||
const delSession = req.session.destroy((error) => {
|
||||
if (Object.keys(error).length) {
|
||||
res.status(500).send({ message: "Internal Server Error" });
|
||||
logger.error("session.destroy", { err });
|
||||
logger.error("session.destroy", { error });
|
||||
return;
|
||||
} else {
|
||||
res.clearCookie(sessionName);
|
||||
|
||||
Reference in New Issue
Block a user