diff --git a/api/genera.go b/api/genera.go index ded9823..ff10d43 100644 --- a/api/genera.go +++ b/api/genera.go @@ -90,5 +90,5 @@ func serveDeleteGenus(w http.ResponseWriter, r *http.Request) error { w.WriteHeader(http.StatusOK) } - return writeJSON(w, &models.Genus{}) + return writeJSON(w, nil) } diff --git a/api/species.go b/api/species.go index 4d16135..c91686b 100644 --- a/api/species.go +++ b/api/species.go @@ -88,7 +88,7 @@ func serveDeleteSpecies(w http.ResponseWriter, r *http.Request) error { w.WriteHeader(http.StatusOK) } - return writeJSON(w, &models.Species{}) + return writeJSON(w, nil) } func serveSubrouterSpeciesList(w http.ResponseWriter, r *http.Request) error { diff --git a/models/species_test.go b/models/species_test.go index 81bb84c..20f1f8a 100644 --- a/models/species_test.go +++ b/models/species_test.go @@ -156,6 +156,7 @@ func TestSpeciesService_Delete(t *testing.T) { mux.HandleFunc(urlPath(t, router.DeleteSpecies, map[string]string{"Id": "1"}), func(w http.ResponseWriter, r *http.Request) { called = true testMethod(t, r, "DELETE") + testBody(t, r, "") w.WriteHeader(http.StatusOK) writeJSON(w, want)