package (and their typing) updates

This commit is contained in:
2025-05-31 22:02:29 -07:00
parent 5e4396031e
commit 935a18f2cc
11 changed files with 485 additions and 653 deletions

View File

@@ -15,14 +15,14 @@ const isAuthenticated: RequestHandler = (req, res, next) => {
if (Object.keys(error).length) {
res.status(500).send({ message: "Internal Server Error" });
logger.error("session.destroy", { error });
return null;
return;
} else {
res.clearCookie(sessionName);
res.status(401).send({ message: "Unauthorized" });
logger.debug("Session invalid, destroyed.", {
sessionID: delSession.id,
});
return null;
return;
}
});
}