Closed kaaac closed 1 month ago
Since 4.2.0 Users cannot re-login after logout. Found typo in internal/db/user/user.go
https://github.com/StevenWeathers/thunderdome-planning-poker/blob/37d26e117600f82913a038dd17e7a71b9bba0084/internal/db/user/user.go#L165C22-L165C38
FROM thunderdome.auth_crednetial c should be FROM thunderdome.auth_credential c
?
Logs:
db-1 | 2024-09-04 09:29:28.429 UTC [9372] LOG: 00000: statement: -- ping db-1 | 2024-09-04 09:29:28.429 UTC [9372] LOCATION: exec_simple_query, postgres.c:1054 db-1 | 2024-09-04 09:29:28.430 UTC [9372] ERROR: 42P01: relation "thunderdome.auth_crednetial" does not exist at character 71 db-1 | 2024-09-04 09:29:28.430 UTC [9372] LOCATION: parserOpenTable, parse_relation.c:1371 db-1 | 2024-09-04 09:29:28.430 UTC [9372] STATEMENT: SELECT u.id, u.name, u.email, u.type, c.verified, u.disabled db-1 | FROM thunderdome.auth_crednetial c db-1 | JOIN thunderdome.users u ON c.user_id = u.id db-1 | WHERE c.email = $1 db-1 | 2024-09-04 09:29:28.502 UTC [9372] LOG: 00000: execute stmtcache_0577759348276048cebebfc2a3634ee617af36f19dfdaec3: SELECT userId, verifyId FROM thunderdome.user_register($1, $2, $3, $4); db-1 | 2024-09-04 09:29:28.502 UTC [9372] DETAIL: parameters: $1 = 'REDACTED', $2 = 'REDACTED', $3 = 'REDACTED', $4 = 'REGISTERED' db-1 | 2024-09-04 09:29:28.502 UTC [9372] LOCATION: exec_execute_message, postgres.c:2163 db-1 | 2024-09-04 09:29:28.505 UTC [9372] ERROR: 23505: duplicate key value violates unique constraint "cred_email_unique_idx" db-1 | 2024-09-04 09:29:28.505 UTC [9372] DETAIL: Key (lower(email::text))=(REDACTED) already exists. db-1 | 2024-09-04 09:29:28.505 UTC [9372] CONTEXT: SQL statement "INSERT INTO thunderdome.auth_credential (user_id, email, password) db-1 | VALUES (userid, useremail, hashedpassword)" db-1 | PL/pgSQL function thunderdome.user_register(character varying,character varying,text,character varying) line 7 at SQL statement db-1 | 2024-09-04 09:29:28.505 UTC [9372] LOCATION: _bt_check_unique, nbtinsert.c:664
No response
Sorry about that fix incoming!
Description
Since 4.2.0 Users cannot re-login after logout. Found typo in internal/db/user/user.go
https://github.com/StevenWeathers/thunderdome-planning-poker/blob/37d26e117600f82913a038dd17e7a71b9bba0084/internal/db/user/user.go#L165C22-L165C38
FROM thunderdome.auth_crednetial c should be FROM thunderdome.auth_credential c
?
Logs:
Describe the solution you'd like
No response
Describe alternatives you've considered
No response