discordapp.com → discord.com (#7140)
This commit is contained in:
parent
3be7eafa6b
commit
41d7515f85
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<div class="_content" v-if="enableDiscordIntegration">
|
<div class="_content" v-if="enableDiscordIntegration">
|
||||||
<header><Fa :icon="faDiscord"/> Discord</header>
|
<header><Fa :icon="faDiscord"/> Discord</header>
|
||||||
<p v-if="integrations.discord">{{ $ts.connectedTo }}: <a :href="`https://discordapp.com/users/${integrations.discord.id}`" rel="nofollow noopener" target="_blank">@{{ integrations.discord.username }}#{{ integrations.discord.discriminator }}</a></p>
|
<p v-if="integrations.discord">{{ $ts.connectedTo }}: <a :href="`https://discord.com/users/${integrations.discord.id}`" rel="nofollow noopener" target="_blank">@{{ integrations.discord.username }}#{{ integrations.discord.discriminator }}</a></p>
|
||||||
<MkButton v-if="integrations.discord" @click="disconnectDiscord">{{ $ts.disconnectSerice }}</MkButton>
|
<MkButton v-if="integrations.discord" @click="disconnectDiscord">{{ $ts.disconnectSerice }}</MkButton>
|
||||||
<MkButton v-else @click="connectDiscord">{{ $ts.connectSerice }}</MkButton>
|
<MkButton v-else @click="connectDiscord">{{ $ts.connectSerice }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -70,7 +70,7 @@ async function getOAuth2() {
|
||||||
return new OAuth2(
|
return new OAuth2(
|
||||||
meta.discordClientId!,
|
meta.discordClientId!,
|
||||||
meta.discordClientSecret!,
|
meta.discordClientSecret!,
|
||||||
'https://discordapp.com/',
|
'https://discord.com/',
|
||||||
'api/oauth2/authorize',
|
'api/oauth2/authorize',
|
||||||
'api/oauth2/token');
|
'api/oauth2/token');
|
||||||
} else {
|
} else {
|
||||||
|
@ -174,7 +174,7 @@ router.get('/dc/cb', async ctx => {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const { id, username, discriminator } = await getJson('https://discordapp.com/api/users/@me', '*/*', 10 * 1000, {
|
const { id, username, discriminator } = await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, {
|
||||||
'Authorization': `Bearer ${accessToken}`,
|
'Authorization': `Bearer ${accessToken}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ router.get('/dc/cb', async ctx => {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const { id, username, discriminator } = await getJson('https://discordapp.com/api/users/@me', '*/*', 10 * 1000, {
|
const { id, username, discriminator } = await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, {
|
||||||
'Authorization': `Bearer ${accessToken}`,
|
'Authorization': `Bearer ${accessToken}`,
|
||||||
});
|
});
|
||||||
if (!id || !username || !discriminator) {
|
if (!id || !username || !discriminator) {
|
||||||
|
|
Loading…
Reference in New Issue