summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorOswaldo <oswaldo@gitlab.com>2017-02-22 14:37:13 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-02-23 19:55:13 -0300
commit2b001d9e7a2136a6d670576843a953115a5c7c25 (patch)
tree37fbbc6ed8001b30bc9939045d0e9e7695837dba /lib/api/helpers.rb
parent2fb3fcf0c0446c9a1568e26e81d49f3b5ce159dc (diff)
downloadgitlab-ce-2b001d9e7a2136a6d670576843a953115a5c7c25.tar.gz
Return 202 with JSON body on async removals on V4 API3874-correctly-return-json-on-delete-responses
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 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)