diff --git a/internal/apirouter/destination_handlers.go b/internal/apirouter/destination_handlers.go index 6f88b459..1a5ecb2e 100644 --- a/internal/apirouter/destination_handlers.go +++ b/internal/apirouter/destination_handlers.go @@ -200,12 +200,7 @@ func (h *DestinationHandlers) Delete(c *gin.Context) { return } - display, err := h.displayer.Display(destination) - if err != nil { - AbortWithError(c, http.StatusInternalServerError, NewErrInternalServer(err)) - return - } - c.JSON(http.StatusOK, display) + c.JSON(http.StatusOK, gin.H{"success": true}) } func (h *DestinationHandlers) Disable(c *gin.Context) { diff --git a/internal/apirouter/destination_handlers_test.go b/internal/apirouter/destination_handlers_test.go index 27d08af0..fd8e0f11 100644 --- a/internal/apirouter/destination_handlers_test.go +++ b/internal/apirouter/destination_handlers_test.go @@ -339,6 +339,10 @@ func TestAPI_Destinations(t *testing.T) { require.Equal(t, http.StatusOK, resp.Code) + var body map[string]any + require.NoError(t, json.Unmarshal(resp.Body.Bytes(), &body)) + assert.Equal(t, true, body["success"]) + // Subsequent GET returns 404 req = httptest.NewRequest(http.MethodGet, "/api/v1/tenants/t1/destinations/d1", nil) resp = h.do(h.withAPIKey(req))