add sessionDestroy func

This commit is contained in:
2023-05-13 06:25:28 +02:00
parent 5392b032d0
commit 96a73035f8
2 changed files with 5 additions and 1 deletions

View File

@@ -82,7 +82,7 @@ httpServer.get("/site", (_req, rep) => {
httpServer.delete("/session", (req, _rep) => {
const username = req.session.user as string ?? "";
if (username.length > 0) {
delete req.session.user;
req.sessionDestroy();
return {
code: 200,
message: "Logged out!",