chagned redirect after discord authentikation
This commit is contained in:
@@ -62,12 +62,12 @@ export const GET = async (req: NextRequest) => {
|
|||||||
tokenType: authData.token_type,
|
tokenType: authData.token_type,
|
||||||
} as DiscordAccount;
|
} as DiscordAccount;
|
||||||
|
|
||||||
const discord = await prisma.discordAccount.upsert({
|
await prisma.discordAccount.upsert({
|
||||||
where: { discordId: discordUser.id },
|
where: { discordId: discordUser.id },
|
||||||
update: discordObject, // Updates if found
|
update: discordObject, // Updates if found
|
||||||
create: discordObject, // Creates if not found
|
create: discordObject, // Creates if not found
|
||||||
});
|
});
|
||||||
return NextResponse.redirect(`${process.env.NEXTAUTH_URL}/settings/account`);
|
return NextResponse.redirect(`${process.env.NEXT_PUBLIC_HUB_URL}/settings`);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
|
|||||||
Reference in New Issue
Block a user