diff --git a/bun.lockb b/bun.lockb index 14de6bf..bdb88dd 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/pages/api/oauth/discord.ts b/src/pages/oauth.ts similarity index 89% rename from src/pages/api/oauth/discord.ts rename to src/pages/oauth.ts index 6ee5ea8..d21cf08 100644 --- a/src/pages/api/oauth/discord.ts +++ b/src/pages/oauth.ts @@ -1,12 +1,12 @@ import type { APIRoute } from "astro"; -import { createAdminClient, SESSION_COOKIE } from "../../../server/appwrite"; +import { createAdminClient, SESSION_COOKIE } from "../server/appwrite"; export const POST: APIRoute = async ({ redirect, url }) => { const { account } = createAdminClient(); const redirectUrl = await account.createOAuth2Token( "discord", - `${url.origin}/api/oauth`, + `${url.origin}/oauth`, `${url.origin}/signin` ); @@ -37,4 +37,4 @@ export const GET: APIRoute = async ({ cookies, redirect, url }) => { }); return redirect("/account"); -}; +}; \ No newline at end of file