add log out
This commit is contained in:
parent
8d0c02e27e
commit
d4d2303796
2 changed files with 20 additions and 0 deletions
|
@ -14,6 +14,12 @@ function legalName(user) {
|
|||
return user.search(/[^A-Za-z0-9\-\_]/g) == -1;
|
||||
}
|
||||
|
||||
router.post('/logout', (req, res, next) => {
|
||||
res.clearCookie('token');
|
||||
apiStat(res, next, `Goodbye!`, '/');
|
||||
return;
|
||||
});
|
||||
|
||||
async function login(req, res, next) {
|
||||
let { user, pass } = req.body;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue