add eslint, fix bugs found

This commit is contained in:
Wingy 2020-11-08 16:54:08 -05:00
parent fc2c3a7114
commit 12558d3384
28 changed files with 1774 additions and 745 deletions

View file

@ -1,14 +1,14 @@
const verifyAuth = require('../../middlewares/verifyAuth');
const express = require('express');
const verifyAuth = require('../../middlewares/verifyAuth')
const express = require('express')
module.exports = () => {
const router = express.Router();
const router = express.Router()
router.get('/', verifyAuth(), (req, res) => res.render('logout'));
router.get('/', verifyAuth(), (req, res) => res.render('logout'))
router.post('/', (req, res) => {
req.logout();
res.redirect('/');
});
req.logout()
res.redirect('/')
})
return router;
};
return router
}