Explorar o código

Fever API: Return response with an empty list if there is no items

Abhinand %!s(int64=8) %!d(string=hai) anos
pai
achega
4674d559a4
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      fever/fever.go

+ 1 - 0
fever/fever.go

@@ -386,6 +386,7 @@ func (c *Controller) handleItems(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	result.Items = make([]item, 0)
 	for _, entry := range entries {
 		isRead := 0
 		if entry.Status == model.EntryStatusRead {