add sessionDestroy func
This commit is contained in:
parent
5392b032d0
commit
96a73035f8
|
@ -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!",
|
||||
|
|
Reference in New Issue
Block a user