mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Fix session lookup.
This commit is contained in:
parent
bbdb672063
commit
9001361e4c
@ -24,7 +24,7 @@ export const useSession = createMiddleware(async (req, res, next) => {
|
||||
|
||||
if (!session) {
|
||||
log('useSession: Session not found');
|
||||
return badRequest(res);
|
||||
return badRequest(res, 'Session not found.');
|
||||
}
|
||||
|
||||
(req as any).session = session;
|
||||
|
@ -62,7 +62,7 @@ export async function findSession(req: NextApiRequestCollect) {
|
||||
}
|
||||
|
||||
// Find session
|
||||
let session = await loadSession(websiteId);
|
||||
let session = await loadSession(sessionId);
|
||||
|
||||
// Create a session if not found
|
||||
if (!session) {
|
||||
|
Loading…
Reference in New Issue
Block a user