Skip to content

Commit

Permalink
remove unnecessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewilkinson committed Jan 24, 2024
1 parent 2c8841d commit 31dd9a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ class App < Roda

# route: GET /login
r.get do
goodreads_user_id, goodreads_token, goodreads_secret = Goodreads.fetch_user request_token
goodreads_user_id, access_token, access_token_secret = Goodreads.fetch_user request_token
session['access_token'] = access_token
session['access_token_secret'] = access_token_secret

session['goodreads_user_id'] = goodreads_user_id

r.redirect '/auth/shelves'
rescue OAuth::Unauthorized
flash[:error] = 'Please authenticate first'
Expand Down
2 changes: 1 addition & 1 deletion lib/goodreads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def fetch_user request_token
user_id = xml.xpath('//user').first.attributes.first[1].value
name = xml.xpath('//user').first.children[1].children.text

[user_id, access_token, goodreads_token, goodreads_secret]
[user_id, goodreads_token, goodreads_secret]
end

def get_gender books
Expand Down

0 comments on commit 31dd9a9

Please sign in to comment.