Skip to content

Commit

Permalink
Fix issues with httprb migration
Browse files Browse the repository at this point in the history
  • Loading branch information
NuckChorris committed May 5, 2024
1 parent 7d646d0 commit 67ec687
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/list_import/anime_planet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get(url, page = 1)
.get(url)
@cookie_jar = request.cookies

html = Nokogiri::HTML(request.body)
html = Nokogiri::HTML(request.body.to_s)
html
end

Expand Down
4 changes: 2 additions & 2 deletions app/services/youtube_service/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(token, api_key: nil)

def valid?
res = HTTP.get(VERIFY_URL.expand(query: { access_token: token }))
res.success? && JSON.parse(res.body)['aud'] == api_key
res.status.success? && JSON.parse(res.body)['aud'] == api_key
end

def channel_id
Expand All @@ -26,7 +26,7 @@ def channel_id
mine: 'true',
access_token: token
}))
return unless res.success?
return unless res.status.success?
channels = JSON.parse(res.body)['items']
channels.first['id']
end
Expand Down

0 comments on commit 67ec687

Please sign in to comment.