diff --git a/lib/api/group_variables.rb b/lib/api/group_variables.rb index 0dd418887e0..f64da4ab77b 100644 --- a/lib/api/group_variables.rb +++ b/lib/api/group_variables.rb @@ -88,6 +88,7 @@ module API variable = user_group.variables.find_by(key: params[:key]) not_found!('GroupVariable') unless variable + status 204 variable.destroy end end diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index de58e9779a9..234825480f2 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -33,10 +33,6 @@ module API @project ||= find_project!(params[:id]) end - def user_group - @group ||= find_group!(params[:id]) - end - def available_labels @available_labels ||= LabelsFinder.new(current_user, project_id: user_project.id).execute end