Compare commits
3 commits
9d3cc8badb
...
75837fa2f7
Author | SHA1 | Date | |
---|---|---|---|
|
75837fa2f7 | ||
|
54ca6d9424 | ||
|
a234d4a934 |
12 changed files with 14 additions and 11 deletions
|
@ -5,5 +5,8 @@ export default defineConfig({
|
|||
output: "server",
|
||||
adapter: node({
|
||||
mode: "standalone"
|
||||
})
|
||||
}),
|
||||
security: {
|
||||
checkOrigin: true,
|
||||
}
|
||||
})
|
|
@ -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/>
|
|
@ -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')
|
|
@ -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
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "astro/tsconfigs/strictest",
|
||||
"extends": "astro/tsconfigs/base",
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
|
|
Reference in a new issue