From 981bbd89683c77485ac226f288c68bd9376e3d2d Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Thu, 31 Mar 2022 18:24:41 +0400 Subject: [PATCH] In this case it is safer to compare with Time field. What if it is a problem with just this song? --- internal/handlers/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/handlers.go b/internal/handlers/handlers.go index 757f530..97a2b11 100644 --- a/internal/handlers/handlers.go +++ b/internal/handlers/handlers.go @@ -135,7 +135,7 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, r *http.Request) { h.logErr.Println("cannot retrieve last songs:", err) } - if song.Artist == "" { + if song.Time == "" { w.WriteHeader(http.StatusNotFound) return }