From 0ea0d8b73c2573d01be04a548473db24f6e64f7d Mon Sep 17 00:00:00 2001 From: Korbs Date: Tue, 16 Jul 2024 05:18:45 -0400 Subject: [PATCH] update --- bun.lockb | Bin 194756 -> 195540 bytes src/pages/{api/oauth/discord.ts => oauth.ts} | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/pages/{api/oauth/discord.ts => oauth.ts} (89%) diff --git a/bun.lockb b/bun.lockb index 14de6bffb8a5ea3000336ffd4ee19f993b06cdcd..bdb88dd677ae2c1f709dfb3831a9d86599523d66 100755 GIT binary patch delta 10101 zcmeI2d3aRS8OHA&5E39PQV0TBkWG*b5H`^)vdJbO6axWelgLhh1Y{8>pe$Njt0N9B z2r=MNiVLBl2nYx$3bqJn>(-zlEQNvsih$tno%v#?Hs!&mkN@<^dGee0ocDb9+;i{T zd+wZbv-PWrd%vytdvB9|4?VDR&z9=GQ}=WZEN!rV<;mCuvvPYJd1gs$+SEl)99!X9pNwrM{(~78) zG!=S4O&A7B!-Ah7b^RL_kMe2j(dL$V^FR$O54!)Z@>f{>vsN#a{~V~{m7pY52Ue*-3RmstW!pcQP~d8`9K2@bb*Agl zD_}EdM_WKisvT|zHMj$mE?af{>fw8!hIfLJRQ~%Q|IeTlu2)jt4~qK|)PW)^A40X= zVNjB){wT;l21*&q=!j2(8afRM_y)AWcUC@&DoG>2qaaglSJui>ovBDGOI?4=Q_;aI zt&+J?owurJc{JMmOR0KOn>dBmF|CWLop@CB^-UY0I;v(Ue@=qSH?3|qSIJZxwxTS* zjRm$v)lhr1650h-k}9sNmBTd>{}y~z^|gAb+UalQ{%+_>4;pGH%_>S#RSn=H3LS~+ z42`q+aFsRQe5ua+WK;(>71aUELHTp$>inx>z8MSTlBCKmn*Y* zRezGHR}WGwt|ZlQbfjJ(oh`nLmAlF$N!3m_)9xN_9vM9>K&tG`R+g&1muYX)K2|SP zwl5#*z^&$otE>U$OV!>$D-ZP4p=5@fg02G`I}0aH)1P!pc%*M_O5`<}<7; zR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<7ns($HH-NJe-goO)!A-_9u7WL1`; zn!A5X+AMQ9uE{V3Dqt#1gDapfoB}S~w}6(wqFwR@yVwc-yTLdZ1Ls3Ob~gc>ral>5 zk3SLS)3yM7{xpNS@HBp2Xqo&&<`WE`az533h|PpqFdKdYt)M21CCNfqO#NoK6>ft& zU^TRbcF++{W+%R3cc8xTu4X&mQ&*uwP~T4#&U5<$@-h7=xIXX^x)xS~?}&%Mbt&Hs zkFc@Jp2n^Qf7z(LQ6K-Gg7H=PtQ+qmzbEQXV&msw4@P^n=3^1YxoB@_0gJIuLg)B0 zpe){=f9$SUyfv*?zx2iJ1#g=HxwT)U?Q^AHrWLi$JG^VB&Ye21xc1BR$-$-L{r)K* f49ML*uw-TFfnL#+4%=2#3@SNdL2mZ2bk08jv({zL 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