mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
5acc1f0f3c
@ -8,6 +8,7 @@ import { findSession } from 'lib/session';
|
|||||||
import {
|
import {
|
||||||
badRequest,
|
badRequest,
|
||||||
createMiddleware,
|
createMiddleware,
|
||||||
|
forbidden,
|
||||||
parseSecureToken,
|
parseSecureToken,
|
||||||
tooManyRequest,
|
tooManyRequest,
|
||||||
unauthorized,
|
unauthorized,
|
||||||
@ -38,6 +39,9 @@ export const useSession = createMiddleware(async (req, res, next) => {
|
|||||||
if (e.message === 'Usage Limit.') {
|
if (e.message === 'Usage Limit.') {
|
||||||
return tooManyRequest(res, e.message);
|
return tooManyRequest(res, e.message);
|
||||||
}
|
}
|
||||||
|
if (e.message.startsWith('Website not found:')) {
|
||||||
|
return forbidden(res, e.message);
|
||||||
|
}
|
||||||
return badRequest(res, e.message);
|
return badRequest(res, e.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user