From 7670f364e39cbcfe234007e28a3038e7c7eac717 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 24 Sep 2022 17:13:09 +0900 Subject: [PATCH] type --- .../src/server/api/integration/DiscordServerService.ts | 10 +++++----- .../src/server/api/integration/GithubServerService.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/server/api/integration/DiscordServerService.ts b/packages/backend/src/server/api/integration/DiscordServerService.ts index 8e4f595ad..1fd103797 100644 --- a/packages/backend/src/server/api/integration/DiscordServerService.ts +++ b/packages/backend/src/server/api/integration/DiscordServerService.ts @@ -80,11 +80,11 @@ export class DiscordServerService { if (meta.enableDiscordIntegration) { return new OAuth2( - meta.discordClientId!, - meta.discordClientSecret!, - 'https://discord.com/', - 'api/oauth2/authorize', - 'api/oauth2/token'); + meta.discordClientId!, + meta.discordClientSecret!, + 'https://discord.com/', + 'api/oauth2/authorize', + 'api/oauth2/token'); } else { return null; } diff --git a/packages/backend/src/server/api/integration/GithubServerService.ts b/packages/backend/src/server/api/integration/GithubServerService.ts index 2ccea36dc..98d623074 100644 --- a/packages/backend/src/server/api/integration/GithubServerService.ts +++ b/packages/backend/src/server/api/integration/GithubServerService.ts @@ -167,7 +167,7 @@ export class GithubServerService { return; } - const { accessToken } = await new Promise((res, rej) => + const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) => oauth2!.getOAuthAccessToken(code, { redirect_uri, }, (err, accessToken, refresh, result) => { @@ -219,7 +219,7 @@ export class GithubServerService { return; } - const { accessToken } = await new Promise((res, rej) => + const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) => oauth2!.getOAuthAccessToken( code, { redirect_uri },