diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-09-06 14:30:54 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-09-13 17:44:18 +0200 |
commit | 940f900f1cc5343c6ba753b6570ca56caa93f8fd (patch) | |
tree | af4a021953071fd6dd5a32e71d48016864b2176c /lib/api | |
parent | 404f438f45c2da884cf4f16239ac1fda548db09f (diff) | |
download | gitlab-ce-940f900f1cc5343c6ba753b6570ca56caa93f8fd.tar.gz |
Change response for /ci/api/v1/builds/register.json from 404 to 204
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers.rb | 4 |
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) |