diff --git a/pages/sessions/basic-api/prisma.md b/pages/sessions/basic-api/prisma.md index b2cb503..94fd824 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