Merge branch 'auth' into dev
All checks were successful
Build and Deploy Go App / build (push) Successful in 6m40s
Build and Deploy Go App / deploy (push) Successful in 35s

This commit is contained in:
nihonium 2025-11-27 12:05:59 +03:00
commit 497e4039ec
Signed by: nihonium
GPG key ID: 0251623741027CFC

View file

@ -281,6 +281,29 @@ func (q *Queries) GetUserByID(ctx context.Context, id int64) (GetUserByIDRow, er
return i, err
}
const getUserByNickname = `-- name: GetUserByNickname :one
SELECT id, avatar_id, passhash, mail, nickname, disp_name, user_desc, creation_date, last_login
FROM users
WHERE nickname = $1
`
func (q *Queries) GetUserByNickname(ctx context.Context, nickname string) (User, error) {
row := q.db.QueryRow(ctx, getUserByNickname, nickname)
var i User
err := row.Scan(
&i.ID,
&i.AvatarID,
&i.Passhash,
&i.Mail,
&i.Nickname,
&i.DispName,
&i.UserDesc,
&i.CreationDate,
&i.LastLogin,
)
return i, err
}
const getUserTitleByID = `-- name: GetUserTitleByID :one
SELECT
ut.user_id, ut.title_id, ut.status, ut.rate, ut.review_id, ut.ctime,