summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-09-14 20:38:32 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-09-14 20:38:32 +0800
commitba84a428287a16e99bd0239bccc20c5a786d3549 (patch)
treeec3007c0151c95589aca1ca95f87c1ccd2fd2bf6 /lib/api/helpers.rb
parent15bb44fc6357ca57e344d7b4818ac74ffb0a4dea (diff)
parent72e9f63ff722585ba75abbf4635f649e88709a70 (diff)
downloadgitlab-ce-ba84a428287a16e99bd0239bccc20c5a786d3549.tar.gz
Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (64 commits) Update the 8.11 to 8.12 update documentation to use gitlab-shell 3.5.0 Update GITLAB_SHELL_VERSION Move pushes_since_gc to Redis Fix Gitlab::Popen.popen thread-safety issue Allow trailing newline in secret base64 data Improve .haml-lint.yml, simplify the haml_lint task and remove CHANGELOG entry Fix a typo in documentation Restore SSH Key title auto-population behavior Add test with inactive error use case for 'POST /ci/api/v1/builds/register.json' Fix rubocop offences Update API documentation Update CHANGELOG Change response for /ci/api/v1/builds/register.json from 404 to 204 Document the fact that merge requests from private forks can be checked out locally Change method name to #reopenable? Improve grammar Fix not working test with execute Add CHANGELOG Improve grammar Add #can_reopen? and tests ...
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 6a20ba95a79..150875ed4f0 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -269,6 +269,10 @@ module API
render_api_error!('304 Not Modified', 304)
end
+ def no_content!
+ render_api_error!('204 No Content', 204)
+ end
+
def render_validation_error!(model)
if model.errors.any?
render_api_error!(model.errors.messages || '400 Bad Request', 400)