Skip to content

Commit aae3da3

Browse files
authored
Update QuickBooks.gs per Google style guide.
1 parent cbba9ef commit aae3da3

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

samples/QuickBooks.gs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
/**********************************************
2-
* Update of /apps-script-oauth1/.../samples/QuickBooks.gs
3-
* to support OAuth2.
4-
**********************************************
5-
6-
/**
1+
/**
72
* Populate constants with data specific to your application,
83
* found at https://developer.intuit.com/v2/ui#/app/appdetail/XXXXXXX
94
*/
@@ -29,8 +24,7 @@ function logRedirectUri() {
2924
function run()
3025
{
3126
var service = getService();
32-
if (service.hasAccess())
33-
{
27+
if (service.hasAccess()) {
3428
// Get the Company ID to be used in the request.
3529
var companyId = PropertiesService.getUserProperties()
3630
.getProperty('QuickBooks.companyId');
@@ -86,19 +80,16 @@ function getService() {
8680
/**
8781
* Handles the OAuth callback.
8882
*/
89-
function authCallback(request)
90-
{
83+
function authCallback(request) {
9184
var service = getService();
9285
var authorized = service.handleCallback(request);
93-
if (authorized)
94-
{
86+
if (authorized) {
9587
PropertiesService.getUserProperties()
9688
.setProperty('QuickBooks.companyId', request.parameter.realmId);
97-
Logger.log("Success!");
89+
Logger.log('Success!');
9890
return HtmlService.createHtmlOutput('Success!');
9991
}
100-
else
101-
{
92+
else {
10293
return HtmlService.createHtmlOutput('Denied');
10394
}
10495
}

0 commit comments

Comments
 (0)