diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2018-08-20 14:45:31 +1000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-08 00:52:57 +1000 |
commit | 6fd4f6804125c0992296d064f3c074d39efeb091 (patch) | |
tree | cfdaf9a1f6ea83fb249a712c0f9704d6397ffb64 /lib/gitlab_net.rb | |
parent | 1ff3561895f361b79f46a059880ea122e3500d08 (diff) | |
download | gitlab-shell-ash.mckenzie/custom-action-support.tar.gz |
Custom Action supportash.mckenzie/custom-action-support
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r-- | lib/gitlab_net.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index 080898e..57ae452 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -33,9 +33,9 @@ class GitlabNet # rubocop:disable Metrics/ClassLength url = "#{internal_api_endpoint}/allowed" resp = post(url, params) - case resp.code.to_s - when HTTP_SUCCESS, HTTP_UNAUTHORIZED, HTTP_NOT_FOUND - GitAccessStatus.create_from_json(resp.body) + case resp.code + when HTTP_SUCCESS, HTTP_MULTIPLE_CHOICES, HTTP_UNAUTHORIZED, HTTP_NOT_FOUND + GitAccessStatus.create_from_json(resp.body, resp.code) else GitAccessStatus.new(false, resp.code, 'API is not accessible') end |