refactoring 1. step
This commit is contained in:
20
src/config/qbo.js
Normal file
20
src/config/qbo.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const OAuthClient = require('intuit-oauth');
|
||||
const { getOAuthClient: getClient, saveTokens, resetOAuthClient } = require('../../qbo_helper');
|
||||
|
||||
function getOAuthClient() {
|
||||
return getClient();
|
||||
}
|
||||
|
||||
function getQboBaseUrl() {
|
||||
return process.env.QBO_ENVIRONMENT === 'production'
|
||||
? 'https://quickbooks.api.intuit.com'
|
||||
: 'https://sandbox-quickbooks.api.intuit.com';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
OAuthClient,
|
||||
getOAuthClient,
|
||||
getQboBaseUrl,
|
||||
saveTokens,
|
||||
resetOAuthClient
|
||||
};
|
||||
Reference in New Issue
Block a user