mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Update qbo.rb
This commit is contained in:
1 parent
000b67b329
commit
9310f207a3
1 file changed
+1
-1
+1
-1
@@ -39,7 +39,7 @@ class Qbo < ActiveRecord::Base
|
|||||||
access_token = OAuth2::AccessToken.from_hash(oauth2_client, qbo.token )
|
access_token = OAuth2::AccessToken.from_hash(oauth2_client, qbo.token )
|
||||||
|
|
||||||
# check to see if we need to refresh the token
|
# check to see if we need to refresh the token
|
||||||
if qbo.expire.to_date.past?
|
if access_token.expired?
|
||||||
new_access_token_object = access_token.refresh!
|
new_access_token_object = access_token.refresh!
|
||||||
qbo.token = new_access_token_object.to_hash
|
qbo.token = new_access_token_object.to_hash
|
||||||
#qbo.qb_token = new_access_token_object.token
|
#qbo.qb_token = new_access_token_object.token
|
||||||
|
|||||||
Reference in new issue
Block a user