mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
17 lines
299 B
JavaScript
17 lines
299 B
JavaScript
let api = {};
|
|
|
|
// Internal authentication routes
|
|
|
|
// Logout the user from the website.
|
|
api.logout = {
|
|
method: 'GET',
|
|
url: '/logout',
|
|
async handler (req, res) {
|
|
if (req.logout) req.logout(); // passportjs method
|
|
req.session = null;
|
|
res.redirect('/');
|
|
},
|
|
};
|
|
|
|
module.exports = api;
|