add eslint, fix bugs found
This commit is contained in:
parent
fc2c3a7114
commit
12558d3384
28 changed files with 1774 additions and 745 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue