Detect expired dashboard logins and redirect to the splash page
This commit is contained in:
parent
f3a90faaa7
commit
8f5a9e607a
4 changed files with 12 additions and 1 deletions
|
@ -167,7 +167,7 @@ export function apiTokenAuthHandlers() {
|
|||
return [
|
||||
passport.authenticate("api-token", { failWithError: true }),
|
||||
(err, req: Request, res: Response, next) => {
|
||||
return res.json({ error: err.message });
|
||||
return res.status(401).json({ error: err.message });
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue