Update coredata user

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-04 15:48:16 -08:00
parent 4614c31ef6
commit eafc4c99c5

View File

@@ -49,10 +49,10 @@ func (u *User) scan(r pgx.Row) error {
)
}
func (u *User) LoadByID(
func (u *User) LoadByEmail(
ctx context.Context,
conn pg.Conn,
userID gid.GID,
email string,
) error {
q := `
SELECT
@@ -64,11 +64,11 @@ SELECT
FROM
users
WHERE
id = @user_id
email = @user_email
LIMIT 1;
`
args := pgx.NamedArgs{"user_id": userID}
args := pgx.NamedArgs{"user_email": email}
r := conn.QueryRow(ctx, q, args)