From 86c58687b22f788ad7c821af55abece2f9d89d50 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 20 Feb 2017 19:18:12 +0100 Subject: Return 204 for delete endpoints --- lib/api/files.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/api/files.rb') diff --git a/lib/api/files.rb b/lib/api/files.rb index 500f9d3c787..9c4e43d77cc 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -118,10 +118,7 @@ module API file_params = declared_params(include_missing: false) result = ::Files::DestroyService.new(user_project, current_user, commit_params(file_params)).execute - if result[:status] == :success - status(200) - commit_response(file_params) - else + if result[:status] != :success render_api_error!(result[:message], 400) end end -- cgit v1.2.1