Move some files around

This commit is contained in:
Korbs 2024-07-17 03:34:02 -04:00
parent a234d4a934
commit 54ca6d9424
10 changed files with 9 additions and 9 deletions

View file

@ -18,7 +18,7 @@ if (Astro.url.href.endsWith('PasswordReset')) {var MessagePasswordReset = true}
else {var MessagePasswordReset = false}
// Supabase Data
import { supabase } from "../library/supabase"
import { supabase } from "@library/supabase"
const { data: { user } } = await supabase.auth.getUser()
const avatarUrl = user?.user_metadata.avatar_url
const displayName = user?.user_metadata.full_name
@ -79,9 +79,9 @@ const lastSignInDate = lastSignIn.toLocaleDateString('en-US', dateFormat)
<p>Theme: {user_theme}</p>
<p>Color Scheme: {user_color_scheme}</p>
{user_beta ?
<form method="post" action="/api/account/beta-off"><button type="submit">Leave Beta</button></form>
<form method="post" action="/api/account/preferences/beta-off"><button type="submit">Leave Beta</button></form>
:
<form method="post" action="/api/account/beta-on"><button type="submit">Enter Beta</button></form>
<form method="post" action="/api/account/preferences/beta-on"><button type="submit">Enter Beta</button></form>
}
</p>
<hr/>

View file

@ -1,7 +1,7 @@
---
import Base from "@layouts/Base.astro"
const CreatorId = Astro.url.href.split("add?=").pop()
import { supabase } from "../../../library/supabase"
import { supabase } from "@library/supabase"
const { data: { user } } = await supabase.auth.getUser()
const { data, error } = await supabase
.from('subs')

View file

@ -1,7 +1,7 @@
---
import Base from "@layouts/Base.astro"
const CreatorId = Astro.url.href.split("remove?=").pop()
import { supabase } from "../../../library/supabase"
import { supabase } from "@library/supabase"
const { data: { user } } = await supabase.auth.getUser()
const id = user?.id
const { data, error } = await supabase

View file

@ -33,5 +33,5 @@ export const POST: APIRoute = async ({ request, redirect }) => {
return new Response(error.message, { status: 500 })
}
return redirect("/email-confirm")
return redirect("/account/email-confirm")
}

View file

@ -17,9 +17,9 @@ let { data: subs } = await supabase
<p style="font-size: 18px; font-weight: bold;">Vsause</p>
<div>
{subs[0].Subscribed ?
<a style="font-size: 14px;" href={"/api/account/remove?=" + 'C6nSFpj9HTCZ5t-N3Rm3-HA'}>Unsubscribe</a>
<a style="font-size: 14px;" href={"/api/account/subscription/remove?=" + 'C6nSFpj9HTCZ5t-N3Rm3-HA'}>Unsubscribe</a>
:
<a style="font-size: 14px;" href={"/api/account/add?=" + 'C6nSFpj9HTCZ5t-N3Rm3-HA'}>Subscribe</a>
<a style="font-size: 14px;" href={"/api/account/subscription/add?=" + 'C6nSFpj9HTCZ5t-N3Rm3-HA'}>Subscribe</a>
}
</div>
</div>

View file

@ -9,7 +9,7 @@ if (Astro.cookies.get('sb-access-token') && Astro.cookies.get('sb-refresh-token'
}
// Supabase Data
import { supabase } from "../library/supabase"
import { supabase } from "@library/supabase"
const { data: { user } } = await supabase.auth.getUser()
const avatar = user?.user_metadata.avatar_url
const displayName = user?.user_metadata.full_name