Ver Fonte

Add missing return statements in PR #1225

Frédéric Guillot há 3 anos atrás
pai
commit
055097fdeb
1 ficheiros alterados com 3 adições e 0 exclusões
  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)