From a0fc6434cb1f65b558a0a94c5cdddf5d79d15206 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 11 Nov 2024 16:41:48 -0500 Subject: Don't erroneously try to get an invite ID as a property of a promise yielding an invite. --- ui/routes/(login)/invite/[invite]/+page.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui/routes') diff --git a/ui/routes/(login)/invite/[invite]/+page.svelte b/ui/routes/(login)/invite/[invite]/+page.svelte index 18bf437..4433bd6 100644 --- a/ui/routes/(login)/invite/[invite]/+page.svelte +++ b/ui/routes/(login)/invite/[invite]/+page.svelte @@ -11,10 +11,10 @@ let pending = false; let disabled = $derived(pending); - async function onSubmit(event) { + async function onSubmit(event, inviteId) { event.preventDefault(); pending = true; - const response = await acceptInvite(data.invite.id, username, password); + const response = await acceptInvite(inviteId, username, password); if (200 <= response.status && response.status < 300) { username = ''; password = ''; @@ -32,5 +32,5 @@

Hi there! {invite.issuer} invites you to the conversation.

- + onSubmit(event, invite.id)} /> {/await} -- cgit v1.2.3