logout implementation

This commit is contained in:
Koushik Dutta
2021-09-02 22:01:17 -07:00
parent dbe79db2e9
commit 9619ac4c40

View File

@@ -228,6 +228,11 @@ else {
});
});
app.get('/logout', (req, res) => {
res.clearCookie('login_user_token');
res.send({});
});
app.post('/login', async (req, res) => {
const hasLogin = await db.getCount(ScryptedUser) > 0;