diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+page.svelte | 9 | ||||
| -rw-r--r-- | src/routes/(app)/events/+server.ts | 8 | ||||
| -rw-r--r-- | src/routes/amber/[id]/[pubkey]/+server.ts | 6 |
3 files changed, 22 insertions, 1 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index b3b91405..c932b4d8 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -1,4 +1,6 @@ <script> + import { browser } from "$app/environment"; + import { onMount } from "svelte"; import { scale } from "svelte/transition"; import { btc, f, sat } from "$lib/utils"; import Icon from "$comp/Icon.svelte"; @@ -8,6 +10,7 @@ import { t } from "$lib/translations"; import { installPrompt } from "$lib/store"; import { afterNavigate, preloadData } from "$app/navigation"; + import { page } from "$app/stores"; let { data } = $props(); @@ -28,8 +31,14 @@ }; if (user) user.savings = 0; + let { host } = $derived($page.url); </script> +<a + href={`nostrsigner:?compressionType=none&returnType=signature&type=get_public_key&callbackUrl=http://${host}/amber/${user.id}/`} + rel="external">Get pubkey</a +> + <div class="space-y-2"> {#if user?.id === subject.id} <div class="space-y-5" data-sveltekit-preload-data="false"> diff --git a/src/routes/(app)/events/+server.ts b/src/routes/(app)/events/+server.ts index 42b9f3dd..59fc472e 100644 --- a/src/routes/(app)/events/+server.ts +++ b/src/routes/(app)/events/+server.ts @@ -1,5 +1,11 @@ import { auth, post } from "$lib/utils"; -import { json, error } from "@sveltejs/kit"; +import { error, json } from "@sveltejs/kit"; + +export async function GET({ url }) { + console.log(url.searchParams.get("event")); + console.log(url.searchParams.get("uid")); + return json({}); +} export async function POST({ cookies, request }) { const body = await request.json(); diff --git a/src/routes/amber/[id]/[pubkey]/+server.ts b/src/routes/amber/[id]/[pubkey]/+server.ts new file mode 100644 index 00000000..6a6f69cf --- /dev/null +++ b/src/routes/amber/[id]/[pubkey]/+server.ts @@ -0,0 +1,6 @@ +import { json } from "@sveltejs/kit"; + +export async function GET({ params }) { + console.log(params); + return json({}); +} |
