Skip to content

Commit ff9a5d2

Browse files
FStefanniHappyZombiesFrancesco Stefanni
authored
fixed misssing return statement in doc (#98)
Co-authored-by: Daniel Reguero <[email protected]> Co-authored-by: Francesco Stefanni <[email protected]>
1 parent aca48ce commit ff9a5d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/model/spec.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ An ``Object`` representing the access token and associated data.
214214

215215
function getAccessToken(accessToken) {
216216
// imaginary DB queries
217-
db.queryAccessToken({access_token: accessToken})
217+
return db.queryAccessToken({access_token: accessToken})
218218
.then(function(token) {
219219
return Promise.all([
220220
token,
@@ -288,7 +288,7 @@ An ``Object`` representing the refresh token and associated data.
288288

289289
function getRefreshToken(refreshToken) {
290290
// imaginary DB queries
291-
db.queryRefreshToken({refresh_token: refreshToken})
291+
return db.queryRefreshToken({refresh_token: refreshToken})
292292
.then(function(token) {
293293
return Promise.all([
294294
token,
@@ -364,7 +364,7 @@ An ``Object`` representing the authorization code and associated data.
364364

365365
function getAuthorizationCode(authorizationCode) {
366366
// imaginary DB queries
367-
db.queryAuthorizationCode({authorization_code: authorizationCode})
367+
return db.queryAuthorizationCode({authorization_code: authorizationCode})
368368
.then(function(code) {
369369
return Promise.all([
370370
code,
@@ -446,7 +446,7 @@ The return value (``client``) can carry additional properties that will be ignor
446446
if (clientSecret) {
447447
params.client_secret = clientSecret;
448448
}
449-
db.queryClient(params)
449+
return db.queryClient(params)
450450
.then(function(client) {
451451
return {
452452
id: client.id,
@@ -984,4 +984,3 @@ Returns ``true`` if the access token passes, ``false`` otherwise.
984984
let authorizedScopes = token.scope.split(' ');
985985
return requestedScopes.every(s => authorizedScopes.indexOf(s) >= 0);
986986
}
987-

0 commit comments

Comments
 (0)