Add login/logout middleware

This commit is contained in:
D. Berge
2020-10-11 17:51:31 +02:00
parent a3bfb73937
commit dd32982cbe
4 changed files with 48 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
async function logout (req, res, next) {
res.clearCookie("JWT");
res.status(204).send();
next();
}
module.exports = logout;