mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update qbo_controller.rb
This commit is contained in:
@@ -62,6 +62,11 @@ class QboController < ApplicationController
|
||||
qbo.token_expires_at = 6.months.from_now.utc
|
||||
qbo.reconnect_token_at = 1.hour.from_now.utc
|
||||
qbo.company_id = params[:realmId]
|
||||
|
||||
access_token = OAuth2::AccessToken.new(oauth2_client, resp.token, refresh_token: resp.refresh_token)
|
||||
qbo.token = access_token
|
||||
qbo.expire = 1.hour.from_now.utc
|
||||
|
||||
if qbo.save!
|
||||
redirect_to qbo_sync_path, :flash => { :notice => "Successfully connected to Quickbooks" }
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user