feat: add user avatar with dicebear dylan

This commit is contained in:
2026-05-07 13:42:21 +02:00
parent 83e480b7b0
commit b5083035f5
6 changed files with 60 additions and 16 deletions

View File

@@ -469,7 +469,7 @@ func (q *Queries) GetUpcomingSeasons(ctx context.Context, userID string) ([]GetU
}
const getUser = `-- name: GetUser :one
SELECT id, username, password_hash, created_at FROM user WHERE id = ? LIMIT 1
SELECT id, username, password_hash, avatar_url, created_at FROM user WHERE id = ? LIMIT 1
`
func (q *Queries) GetUser(ctx context.Context, id string) (User, error) {
@@ -479,13 +479,14 @@ func (q *Queries) GetUser(ctx context.Context, id string) (User, error) {
&i.ID,
&i.Username,
&i.PasswordHash,
&i.AvatarURL,
&i.CreatedAt,
)
return i, err
}
const getUserByUsername = `-- name: GetUserByUsername :one
SELECT id, username, password_hash, created_at FROM user WHERE username = ? LIMIT 1
SELECT id, username, password_hash, avatar_url, created_at FROM user WHERE username = ? LIMIT 1
`
func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User, error) {
@@ -495,6 +496,7 @@ func (q *Queries) GetUserByUsername(ctx context.Context, username string) (User,
&i.ID,
&i.Username,
&i.PasswordHash,
&i.AvatarURL,
&i.CreatedAt,
)
return i, err