updated s3_key name to icon_hash

This commit is contained in:
Joe Lothan 2026-05-25 21:05:26 -04:00
parent e308718eb2
commit 33bd0a221e
8 changed files with 31 additions and 31 deletions

View file

@ -43,7 +43,7 @@ func claimBatch(ctx context.Context, pool *pgxpool.Pool, limit int) ([]IconRow,
// DownloadResult holds the outcome of downloading one icon.
type DownloadResult struct {
S3Key string
IconHash string
ContentType string
Width int
Height int
@ -65,14 +65,14 @@ func updateIcon(ctx context.Context, pool *pgxpool.Pool, iconID int64, result Do
_, err := pool.Exec(ctx, `
UPDATE icons SET
scan_state = 'completed',
s3_key = $1,
icon_hash = $1,
content_type = $2,
width = $3,
height = $4,
file_size = $5,
downloaded_at = now()
WHERE id = $6`,
result.S3Key, result.ContentType,
result.IconHash, result.ContentType,
nilIntIf(result.Width, 0), nilIntIf(result.Height, 0),
result.FileSize, iconID)
return err