Remove duplicate Discord link creation code

cgen-745699c36f634d7285fe01977f4ffdec
This commit is contained in:
Builder.io 2025-11-10 22:19:03 +00:00
parent 8584784250
commit b545894b81

View file

@ -276,18 +276,6 @@ export default async function handler(req: any, res: any) {
return res.redirect("/login?error=link_create");
}
// Create Discord link
const { error: linkError } = await supabase.from("discord_links").upsert({
discord_id: discordUser.id,
user_id: userId,
linked_at: new Date().toISOString(),
});
if (linkError) {
console.error("[Discord OAuth] Link creation failed:", linkError);
return res.redirect("/login?error=link_create");
}
// Generate session token
const { data: sessionData, error: sessionError } =
await supabase.auth.admin.createSession({