diff options
author | ljungster <parkerljung@gmail.com> | 2022-03-17 16:49:13 -0400 |
---|---|---|
committer | ljungster <parkerljung@gmail.com> | 2022-03-17 16:49:13 -0400 |
commit | 87ecbf85db2e1d51c0bab92154500548942fac22 (patch) | |
tree | 6383d335e3d6a389ae0fb83be535aaa5afb0fbfd /src/server/apis/google/GoogleApiServerUtils.ts | |
parent | 3d8ed6f4fd23f65b43cff9eeb7dd91589e496697 (diff) | |
parent | 73ba1a0395167ab5949f71d0c82fa7188d37ab5c (diff) |
Merge remote-tracking branch 'origin/speedups2' into parker
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) { |