diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-03-17 16:35:32 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-03-17 16:35:32 -0400 |
commit | cb5f0847b098d89a1390acf90579b3c7fbc5ac3e (patch) | |
tree | 0266608b61495b5903ff419fa26e04fb5fbeef0a /src/server/apis/google/GoogleApiServerUtils.ts | |
parent | f1f341b53a1a49427cf7ef40afdcd95a9b0e4e9d (diff) | |
parent | 5c874c6829d9957696dfe61014173b6800c864df (diff) |
Merge branch 'naafi-linking' of https://github.com/brown-dash/Dash-Web into naafi-linking
Diffstat (limited to 'src/server/apis/google/GoogleApiServerUtils.ts')
-rw-r--r-- | src/server/apis/google/GoogleApiServerUtils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/apis/google/GoogleApiServerUtils.ts b/src/server/apis/google/GoogleApiServerUtils.ts index 64bafe7fb..4453b83bf 100644 --- a/src/server/apis/google/GoogleApiServerUtils.ts +++ b/src/server/apis/google/GoogleApiServerUtils.ts @@ -128,7 +128,7 @@ export namespace GoogleApiServerUtils { * @param userId the id of the Dash user making the request to the API * @returns the relevant 'googleapis' wrapper, if any */ - export async function GetEndpoint(sector: string, userId: string): Promise<Opt<Endpoint>> { + export async function GetEndpoint(sector: string, userId: string): Promise<Endpoint | void> { return new Promise(async resolve => { const auth = await retrieveOAuthClient(userId); if (!auth) { @@ -157,7 +157,7 @@ export namespace GoogleApiServerUtils { * npm-installed API wrappers that use authenticated client instances rather than access codes for * security. */ - export async function retrieveOAuthClient(userId: string): Promise<OAuth2Client> { + export async function retrieveOAuthClient(userId: string): Promise<OAuth2Client | void> { return new Promise(async resolve => { const { credentials, refreshed } = await retrieveCredentials(userId); if (!credentials) { |