3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Detect expired dashboard logins and redirect to the splash page

This commit is contained in:
Dragory 2021-05-22 21:33:34 +03:00
parent f3a90faaa7
commit 8f5a9e607a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 12 additions and 1 deletions

View file

@ -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 });
},
];
}