Skip to content

Commit

Permalink
get_url should use the hndl server from env.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Aug 27, 2018
1 parent 3912fd2 commit 0507b52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/concerns/helpable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def register_url
end

def get_url
url = "https://doi.org/api/handles/#{doi}?index=1"
url = "#{ENV['HANDLE_URL']}/api/handles/#{doi}?index=1"

This comment has been minimized.

Copy link
@mfenner

mfenner Aug 27, 2018

Contributor

@richardhallett good find!

response = Maremma.get(url, ssl_self_signed: true, timeout: 10)

if response.status == 200
Expand Down Expand Up @@ -116,7 +116,7 @@ def get_dois(options={})
response
else
text = "Error " + response.body["errors"].inspect

logger = Logger.new(STDOUT)
logger.error "[Handle] " + text
User.send_notification_to_slack(text, title: "Error #{response.status.to_s}", level: "danger") unless Rails.env.test?
Expand Down

0 comments on commit 0507b52

Please sign in to comment.