feat(repo): format SQL query in MoveToArchive for improved readability

This commit is contained in:
Nik Afiq 2025-12-11 21:50:21 +09:00
parent a537eb4fc2
commit a9de32bed1

View File

@ -155,7 +155,15 @@ func (r *pgxEpisodeRepo) MoveToArchive(ctx context.Context, ids []int64) (episod
// Grab the rows we need to archive.
rows, err := tx.Query(ctx, `
SELECT id, ep_num, ep_title, season_name, start_time, playback_length, current_ep, date_created
SELECT
id,
ep_num,
ep_title,
season_name,
to_char(start_time, 'HH24:MI:SS') AS start_time,
to_char(playback_length, 'HH24:MI:SS') AS playback_length,
current_ep,
date_created
FROM current
WHERE id = ANY($1::bigint[])
`, ids)