Skip to content

Fix: Correct table reference in invalidateUserSessions#53

Open
heitzlki wants to merge 1 commit into
webdevcody:mainfrom
heitzlki:main
Open

Fix: Correct table reference in invalidateUserSessions#53
heitzlki wants to merge 1 commit into
webdevcody:mainfrom
heitzlki:main

Conversation

@heitzlki

@heitzlki heitzlki commented Sep 3, 2025

Copy link
Copy Markdown

Fix: Correct table reference in invalidateUserSessions

This pull request resolves a PostgresError: missing FROM-clause entry for table "gf_user" that occurred when a user signs out from all devices.

The invalidateUserSessions function was incorrectly referencing the users table in the WHERE clause (eq(users.id, userId)). The query only selects from the sessions table, so this reference was invalid.

This change updates the query to reference the userId column on the sessions table (eq(sessions.userId, userId)), which resolves the database error.

This pull request resolves a PostgresError: missing FROM-clause entry for table "gf_user" that occurred when a user signs out from all devices.

The invalidateUserSessions function was incorrectly referencing the users table in the WHERE clause (eq(users.id, userId)). The query only selects from the sessions table, so this reference was invalid.

This change updates the query to reference the userId column on the sessions table (eq(sessions.userId, userId)), which resolves the database error.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@heitzlki heitzlki changed the title Fix: Correct table reference in invalidateUserSessions` Fix: Correct table reference in invalidateUserSessions Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant