update logout route
This commit is contained in:
parent
a06802fb6c
commit
6974435a46
|
@ -15,9 +15,17 @@ export default async (req: Request, res: Response) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
req.logout();
|
req.logout((err) => {
|
||||||
res.status(200);
|
if (err) {
|
||||||
res.json({
|
res.status(500);
|
||||||
success: true,
|
res.json({
|
||||||
|
errors: [t`Server error when logging out.`],
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.status(200);
|
||||||
|
res.json({
|
||||||
|
success: true,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user