diff --git a/api/server/fns_delete.go b/api/server/fns_delete.go index 25c393dcd..58cb29bfa 100644 --- a/api/server/fns_delete.go +++ b/api/server/fns_delete.go @@ -18,5 +18,5 @@ func (s *Server) handleFnDelete(c *gin.Context) { return } - c.JSON(http.StatusOK, gin.H{"message": "Successfully deleted func"}) + c.String(http.StatusNoContent, "") } diff --git a/api/server/fns_test.go b/api/server/fns_test.go index f4fd8dc01..c01733cef 100644 --- a/api/server/fns_test.go +++ b/api/server/fns_test.go @@ -155,7 +155,7 @@ func TestFnDelete(t *testing.T) { expectedError error }{ {commonDS, logs.NewMock(), "/v2/fns/missing", "", http.StatusNotFound, models.ErrFnsNotFound}, - {commonDS, logs.NewMock(), fmt.Sprintf("/v2/fns/%s", f.ID), "", http.StatusOK, nil}, + {commonDS, logs.NewMock(), fmt.Sprintf("/v2/fns/%s", f.ID), "", http.StatusNoContent, nil}, } { rnr, cancel := testRunner(t) srv := testServer(test.ds, &mqs.Mock{}, test.logDB, rnr, ServerTypeFull) diff --git a/api/server/trigger_delete.go b/api/server/trigger_delete.go index 3d377fd45..d44d0c074 100644 --- a/api/server/trigger_delete.go +++ b/api/server/trigger_delete.go @@ -16,5 +16,5 @@ func (s *Server) handleTriggerDelete(c *gin.Context) { return } - c.JSON(http.StatusNoContent, nil) + c.String(http.StatusNoContent, "") } diff --git a/docs/swagger_v2.yml b/docs/swagger_v2.yml index d2992a0f1..25760f2b5 100644 --- a/docs/swagger_v2.yml +++ b/docs/swagger_v2.yml @@ -82,8 +82,8 @@ paths: parameters: - $ref: '#/parameters/AppID' responses: - 200: - description: "The Application successfully deleted." + 204: + description: "Application successfully deleted." 404: description: "Application does not exist." schema: @@ -418,7 +418,7 @@ definitions: readOnly: true config: type: object - description: "Application function configuration, applied to all routes." + description: "Application function configuration, applied to all Functions." additionalProperties: type: string annotations: