diff --git a/src/auth.ts b/src/auth.ts index d02c5ad..3bb96b1 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -98,7 +98,7 @@ export async function invalidateSession(sessionId: string): Promise { } export async function invalidateUserSessions(userId: UserId): Promise { - await database.delete(sessions).where(eq(users.id, userId)); + await database.delete(sessions).where(eq(sessions.userId, userId)); } export type SessionValidationResult =