Fix session lookup.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user