From cb0d23c455b73486fd1015f8ca9479b5b7e3585d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 21 Jan 2020 14:21:10 +0000 Subject: Add latest changes from gitlab-org/gitlab@12-7-stable-ee --- lib/api/helpers.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 37cb6d6a639..b2f5def4048 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -4,6 +4,7 @@ module API module Helpers include Gitlab::Utils include Helpers::Pagination + include Helpers::PaginationStrategies SUDO_HEADER = "HTTP_SUDO" GITLAB_SHARED_SECRET_HEADER = "Gitlab-Shared-Secret" @@ -30,6 +31,7 @@ module API check_unmodified_since!(last_updated) status 204 + body false if block_given? yield resource @@ -363,6 +365,10 @@ module API render_api_error!('204 No Content', 204) end + def created! + render_api_error!('201 Created', 201) + end + def accepted! render_api_error!('202 Accepted', 202) end -- cgit v1.2.1