refactor: updated swagger;
feat: helper function in errors for checking postgres error types; feat: sql query method for finding users by their email; feat: registration begin/complete with checking existing username/email; refactor: error handling in controller
This commit is contained in:
@@ -34,6 +34,11 @@ WHERE id = $1;
|
||||
SELECT * FROM users
|
||||
WHERE username = $1;
|
||||
|
||||
;-- name: GetUserByEmail :one
|
||||
SELECT users.* FROM users
|
||||
JOIN login_informations linfo ON linfo.user_id = users.id
|
||||
WHERE linfo.email = @email::text;
|
||||
|
||||
;-- name: GetUserByLoginCredentials :one
|
||||
SELECT
|
||||
users.id,
|
||||
|
||||
Reference in New Issue
Block a user