refactor: manually renamed password fields
This commit is contained in:
@@ -76,11 +76,11 @@ WHERE users.username = $1;
|
||||
|
||||
;-- name: CreateLoginInformation :one
|
||||
INSERT INTO login_informations(user_id, email, password_hash)
|
||||
VALUES ( $1, $2, crypt($3, gen_salt('bf')) ) RETURNING *;
|
||||
VALUES ( $1, $2, crypt(@password::text, gen_salt('bf')) ) RETURNING *;
|
||||
|
||||
;-- name: UpdateLoginInformationByUsername :exec
|
||||
UPDATE login_informations
|
||||
SET email = $2, password_hash = crypt($3, gen_salt('bf')), totp_encrypted = $4, email_2fa_enabled = $5, password_change_date = $6
|
||||
SET email = $2, password_hash = crypt(@password::text, gen_salt('bf')), totp_encrypted = $4, email_2fa_enabled = $5, password_change_date = $6
|
||||
FROM users
|
||||
WHERE users.username = $1 AND login_informations.user_id = users.id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user