mirror of
https://github.com/fiatjaf/khatru.git
synced 2026-04-18 19:36:54 +02:00
corrects malformed json in blossom list
This commit is contained in:
@@ -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{']'})
|
||||
|
||||
Reference in New Issue
Block a user