diff options
| author | Adam Soltys <[email protected]> | 2024-11-06 08:24:01 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-06 08:24:01 -0800 |
| commit | 053bbfbe4945d230ebf1c79cc12b340f0075f37c (patch) | |
| tree | 99bb6e82a6813423dcb9a185c87b9e0a4aa1e70d /src/routes | |
| parent | 59659fa49ab868bec38ed3a7767de6486a54e414 (diff) | |
| download | coinos-ui-053bbfbe4945d230ebf1c79cc12b340f0075f37c.tar.gz coinos-ui-053bbfbe4945d230ebf1c79cc12b340f0075f37c.zip | |
check for user
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts index 55228025..2b10b375 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.ts +++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts @@ -13,7 +13,7 @@ export async function load({ cookies, params: { id }, parent }) { if (invoice.memoPrompt && invoice.memo === null) redirect(307, `/invoice/${id}/memo`); - if (invoice.aid === aid) error(500, { message: "Cannot send to self" }); + if (user && invoice.aid === aid) error(500, { message: "Cannot send to self" }); else if (user && invoice.type !== types.lightning) redirect(307, `/send/${invoice.type}/${invoice.hash}`); if (!user) redirect(307, `/invoice/${id}`); |
