Move some files around
This commit is contained in:
parent
a234d4a934
commit
54ca6d9424
10 changed files with 9 additions and 9 deletions
|
@ -18,7 +18,7 @@ if (Astro.url.href.endsWith('PasswordReset')) {var MessagePasswordReset = true}
|
||||||
else {var MessagePasswordReset = false}
|
else {var MessagePasswordReset = false}
|
||||||
|
|
||||||
// Supabase Data
|
// Supabase Data
|
||||||
import { supabase } from "../library/supabase"
|
import { supabase } from "@library/supabase"
|
||||||
const { data: { user } } = await supabase.auth.getUser()
|
const { data: { user } } = await supabase.auth.getUser()
|
||||||
const avatarUrl = user?.user_metadata.avatar_url
|
const avatarUrl = user?.user_metadata.avatar_url
|
||||||
const displayName = user?.user_metadata.full_name
|
const displayName = user?.user_metadata.full_name
|
||||||
|
@ -79,9 +79,9 @@ const lastSignInDate = lastSignIn.toLocaleDateString('en-US', dateFormat)
|
||||||
<p>Theme: {user_theme}</p>
|
<p>Theme: {user_theme}</p>
|
||||||
<p>Color Scheme: {user_color_scheme}</p>
|
<p>Color Scheme: {user_color_scheme}</p>
|
||||||
{user_beta ?
|
{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>
|
</p>
|
||||||
<hr/>
|
<hr/>
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
import Base from "@layouts/Base.astro"
|
import Base from "@layouts/Base.astro"
|
||||||
const CreatorId = Astro.url.href.split("add?=").pop()
|
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: { user } } = await supabase.auth.getUser()
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from('subs')
|
.from('subs')
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
import Base from "@layouts/Base.astro"
|
import Base from "@layouts/Base.astro"
|
||||||
const CreatorId = Astro.url.href.split("remove?=").pop()
|
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 { data: { user } } = await supabase.auth.getUser()
|
||||||
const id = user?.id
|
const id = user?.id
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
|
@ -33,5 +33,5 @@ export const POST: APIRoute = async ({ request, redirect }) => {
|
||||||
return new Response(error.message, { status: 500 })
|
return new Response(error.message, { status: 500 })
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect("/email-confirm")
|
return redirect("/account/email-confirm")
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@ let { data: subs } = await supabase
|
||||||
<p style="font-size: 18px; font-weight: bold;">Vsause</p>
|
<p style="font-size: 18px; font-weight: bold;">Vsause</p>
|
||||||
<div>
|
<div>
|
||||||
{subs[0].Subscribed ?
|
{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>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@ if (Astro.cookies.get('sb-access-token') && Astro.cookies.get('sb-refresh-token'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Supabase Data
|
// Supabase Data
|
||||||
import { supabase } from "../library/supabase"
|
import { supabase } from "@library/supabase"
|
||||||
const { data: { user } } = await supabase.auth.getUser()
|
const { data: { user } } = await supabase.auth.getUser()
|
||||||
const avatar = user?.user_metadata.avatar_url
|
const avatar = user?.user_metadata.avatar_url
|
||||||
const displayName = user?.user_metadata.full_name
|
const displayName = user?.user_metadata.full_name
|
||||||
|
|
Loading…
Reference in a new issue