fix: address code review findings

This commit is contained in:
2026-07-19 19:28:51 +03:00
parent 401c1218b6
commit beef81d598
4 changed files with 14 additions and 6 deletions

View File

@@ -135,10 +135,9 @@ func SyncArtistDiscography(
ext.IsIgnored = ignored
}
cachedAtStr := ext.CachedAt.Format("2006-01-02 15:04:05")
if _, err := tx.Exec(
"INSERT INTO external_releases (rgid, artist_id, title, type, release_date, is_ignored, cached_at) VALUES (?, ?, ?, ?, ?, ?, ?)",
ext.RGID, ext.ArtistID, ext.Title, ext.Type, ext.ReleaseDate, ext.IsIgnored, cachedAtStr,
ext.RGID, ext.ArtistID, ext.Title, ext.Type, ext.ReleaseDate, ext.IsIgnored, ext.CachedAt,
); err != nil {
return nil, fmt.Errorf("sync artist discography: insert release %s: %w", rg.ID, err)
}