update
This commit is contained in:
parent
1836729e9f
commit
0ea0d8b73c
2 changed files with 3 additions and 3 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -1,12 +1,12 @@
|
||||||
import type { APIRoute } from "astro";
|
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 }) => {
|
export const POST: APIRoute = async ({ redirect, url }) => {
|
||||||
const { account } = createAdminClient();
|
const { account } = createAdminClient();
|
||||||
|
|
||||||
const redirectUrl = await account.createOAuth2Token(
|
const redirectUrl = await account.createOAuth2Token(
|
||||||
"discord",
|
"discord",
|
||||||
`${url.origin}/api/oauth`,
|
`${url.origin}/oauth`,
|
||||||
`${url.origin}/signin`
|
`${url.origin}/signin`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -37,4 +37,4 @@ export const GET: APIRoute = async ({ cookies, redirect, url }) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
return redirect("/account");
|
return redirect("/account");
|
||||||
};
|
};
|
Loading…
Reference in a new issue