diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-22 10:13:20 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-22 10:13:20 +0000 |
commit | 7e8a6a63af2138c5f3f2030ef8c65e8d4815eed3 (patch) | |
tree | e33f0190509c5793c67f5589bc455f53a529efc4 /lib/api/helpers.rb | |
parent | 065a52c8144e621f699762b0206a14a010897254 (diff) | |
parent | 2ace39f2420abf018ceef6aaad52e4917bcbab7d (diff) | |
download | gitlab-ce-7e8a6a63af2138c5f3f2030ef8c65e8d4815eed3.tar.gz |
Merge branch '28093-snippet-and-issue-spam-check-on-edit' into 'master'
Spam check and reCAPTCHA improvements
Closes #28093
See merge request !9248
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 ae62f1f9580..a1db2099693 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -215,6 +215,10 @@ module API end end + def render_spam_error! + render_api_error!({ error: 'Spam detected' }, 400) + end + def render_api_error!(message, status) error!({ 'message' => message }, status, header) end |