Skip to content

Commit 88996b5

Browse files
authored
Updated JSDoc syntax for better type suggestions - getRedirectUri (#369)
1 parent 058dfcd commit 88996b5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/OAuth2.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ function createService(serviceName) {
4444
/**
4545
* Returns the redirect URI that will be used for a given script. Often this URI
4646
* needs to be entered into a configuration screen of your OAuth provider.
47-
* @param {string} [optScriptId] The script ID of your script, which can be
47+
* @param {string=} optScriptId The script ID of your script, which can be
4848
* found in the Script Editor UI under "File > Project properties". Defaults
4949
* to the script ID of the script being executed.
5050
* @return {string} The redirect URI.
5151
*/
5252
function getRedirectUri(optScriptId) {
5353
var scriptId = optScriptId || ScriptApp.getScriptId();
5454
return 'https://script.google.com/macros/d/' + encodeURIComponent(scriptId) +
55-
'/usercallback';
55+
'/usercallback';
5656
}
5757

5858
/**
@@ -65,12 +65,12 @@ function getRedirectUri(optScriptId) {
6565
*/
6666
function getServiceNames(propertyStore) {
6767
var props = propertyStore.getProperties();
68-
return Object.keys(props).filter(function(key) {
68+
return Object.keys(props).filter(function (key) {
6969
var parts = key.split('.');
7070
return key.indexOf(STORAGE_PREFIX_) == 0 && parts.length > 1 && parts[1];
71-
}).map(function(key) {
71+
}).map(function (key) {
7272
return key.split('.')[1];
73-
}).reduce(function(result, key) {
73+
}).reduce(function (result, key) {
7474
if (result.indexOf(key) < 0) {
7575
result.push(key);
7676
}

0 commit comments

Comments
 (0)