Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-04 19:47:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-04 19:47:02 +0300
commitd00f14d73f41129f9d986d4bec32f1f927b525a6 (patch)
tree93a8f2296ead9161cd71899e4f410e929ae33fb4 /app/controllers/projects
parent1b6a590b197788a06a1ff726ea61630a49b10412 (diff)
Add latest changes from gitlab-org/security/gitlab@13-6-stable-ee
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/feature_flags_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/projects/feature_flags_controller.rb b/app/controllers/projects/feature_flags_controller.rb
index e9d450a6ce3..9142f769b28 100644
--- a/app/controllers/projects/feature_flags_controller.rb
+++ b/app/controllers/projects/feature_flags_controller.rb
@@ -77,7 +77,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
end
else
respond_to do |format|
- format.json { render_error_json(result[:message]) }
+ format.json { render_error_json(result[:message], result[:http_status]) }
end
end
end
@@ -167,8 +167,8 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
render json: feature_flag_json(feature_flag), status: :ok
end
- def render_error_json(messages)
+ def render_error_json(messages, status = :bad_request)
render json: { message: messages },
- status: :bad_request
+ status: status
end
end