This commit is contained in:
Korbs 2024-07-16 05:18:45 -04:00
parent 1836729e9f
commit 0ea0d8b73c
2 changed files with 3 additions and 3 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -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");
};
};