back to redis (gotta cache API calls)

This commit is contained in:
2025-03-05 00:16:01 -07:00
parent ba8982086b
commit 5a8611afbc
6 changed files with 224 additions and 1540 deletions

View File

@@ -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);