mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
chore(): rename website/src -> website/server and website/public -> website/client (#7199)
This commit is contained in:
16
website/server/controllers/top-level/auth.js
Normal file
16
website/server/controllers/top-level/auth.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user