trilium/routes/logout.js
2017-10-21 21:10:33 -04:00

15 lines
269 B
JavaScript

"use strict";
const express = require('express');
const router = express.Router();
router.post('', async (req, res, next) => {
req.session.regenerate(() => {
req.session.loggedIn = false;
res.redirect('/');
});
});
module.exports = router;