type
This commit is contained in:
parent
fd5976f378
commit
7670f364e3
|
@ -80,11 +80,11 @@ export class DiscordServerService {
|
||||||
|
|
||||||
if (meta.enableDiscordIntegration) {
|
if (meta.enableDiscordIntegration) {
|
||||||
return new OAuth2(
|
return new OAuth2(
|
||||||
meta.discordClientId!,
|
meta.discordClientId!,
|
||||||
meta.discordClientSecret!,
|
meta.discordClientSecret!,
|
||||||
'https://discord.com/',
|
'https://discord.com/',
|
||||||
'api/oauth2/authorize',
|
'api/oauth2/authorize',
|
||||||
'api/oauth2/token');
|
'api/oauth2/token');
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ export class GithubServerService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { accessToken } = await new Promise<any>((res, rej) =>
|
const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) =>
|
||||||
oauth2!.getOAuthAccessToken(code, {
|
oauth2!.getOAuthAccessToken(code, {
|
||||||
redirect_uri,
|
redirect_uri,
|
||||||
}, (err, accessToken, refresh, result) => {
|
}, (err, accessToken, refresh, result) => {
|
||||||
|
@ -219,7 +219,7 @@ export class GithubServerService {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { accessToken } = await new Promise<any>((res, rej) =>
|
const { accessToken } = await new Promise<{ accessToken: string }>((res, rej) =>
|
||||||
oauth2!.getOAuthAccessToken(
|
oauth2!.getOAuthAccessToken(
|
||||||
code,
|
code,
|
||||||
{ redirect_uri },
|
{ redirect_uri },
|
||||||
|
|
Loading…
Reference in New Issue