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/variables.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/api/variables.rb') diff --git a/lib/api/variables.rb b/lib/api/variables.rb index f623b1dfe9f..259bc051d52 100644 --- a/lib/api/variables.rb +++ b/lib/api/variables.rb @@ -81,10 +81,9 @@ module API end delete ':id/variables/:key' do variable = user_project.variables.find_by(key: params[:key]) - return not_found!('Variable') unless variable - present variable.destroy, with: Entities::Variable + variable.destroy end end end -- cgit v1.2.1