From 46a76b19d267aaa51d926a5f9df244857d41464a Mon Sep 17 00:00:00 2001 From: Azura <98067579+a-zzura@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:47:06 +0200 Subject: [PATCH] fix missing where clause --- pages/sessions/basic-api/prisma.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/sessions/basic-api/prisma.md b/pages/sessions/basic-api/prisma.md index f181c61..0a535e9 100644 --- a/pages/sessions/basic-api/prisma.md +++ b/pages/sessions/basic-api/prisma.md @@ -140,7 +140,7 @@ export async function validateSessionToken(token: string): Promise= session.expiresAt.getTime()) { - await prisma.session.delete(sessionId); + await prisma.session.delete({ where: { id: sessionId } }); return { session: null, user: null }; } if (Date.now() >= session.expiresAt.getTime() - 1000 * 60 * 60 * 24 * 15) { @@ -214,7 +214,7 @@ export async function validateSessionToken(token: string): Promise= session.expiresAt.getTime()) { - await prisma.session.delete(sessionId); + await prisma.session.delete({ where: { id: sessionId } }); return { session: null, user: null }; } if (Date.now() >= session.expiresAt.getTime() - 1000 * 60 * 60 * 24 * 15) { @@ -232,7 +232,7 @@ export async function validateSessionToken(token: string): Promise