corrects malformed json in blossom list

This commit is contained in:
Your Name
2024-11-22 00:04:40 -03:00
committed by fiatjaf_
parent 7bfdbb557c
commit 1b4d81dde4

View File

@@ -264,7 +264,13 @@ func (bs BlossomServer) handleList(w http.ResponseWriter, r *http.Request) {
w.Write([]byte{'['})
enc := json.NewEncoder(w)
first := true
for bd := range ch {
if !first {
w.Write([]byte{','})
} else {
first = false
}
enc.Encode(bd)
}
w.Write([]byte{']'})