1
0

In this case it is safer to compare with Time field. What if it is a problem with just this song?

This commit is contained in:
Alexander Andreev 2022-03-31 18:24:41 +04:00
parent d60da459ac
commit 981bbd8968
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -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
}