diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-24 11:26:44 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-24 11:26:44 +0000 |
commit | 806c748852e7d62dfa13fd2d039949ce0f875a12 (patch) | |
tree | ad2142c9c63d3a3aca7d71a048bda460b1767389 /lib/api/helpers.rb | |
parent | a82e3d30b2ef625dae0d2f25324460402f960f09 (diff) | |
parent | f40403cce1a8185254e74dff54ee687b7953093b (diff) | |
download | gitlab-ce-api-remove-owned-groups.tar.gz |
Merge branch 'master' into 'api-remove-owned-groups'api-remove-owned-groups
# Conflicts:
# doc/api/v3_to_v4.md
Diffstat (limited to 'lib/api/helpers.rb')
-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 d0efa7b993b..72d2b320077 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -209,6 +209,10 @@ module API render_api_error!('204 No Content', 204) end + def accepted! + render_api_error!('202 Accepted', 202) + end + def render_validation_error!(model) if model.errors.any? render_api_error!(model.errors.messages || '400 Bad Request', 400) |