Sfoglia il codice sorgente

Add missing return statements in PR #1225

Frédéric Guillot 3 anni fa
parent
commit
055097fdeb
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      api/entry.go

+ 3 - 0
api/entry.go

@@ -196,9 +196,12 @@ func (h *handler) fetchContent(w http.ResponseWriter, r *http.Request) {
 	user, err := h.store.UserByID(entry.UserID)
 	if err != nil {
 		json.ServerError(w, r, err)
+		return
 	}
+
 	if user == nil {
 		json.NotFound(w, r)
+		return
 	}
 
 	feedBuilder := storage.NewFeedQueryBuilder(h.store, loggedUserID)