Fix session lookup.
This commit is contained in:
1 parent
bbdb672063
commit
9001361e4c
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user