aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/invoice
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-10 20:39:47 -0700
committerAdam Soltys <[email protected]>2024-09-17 09:18:36 -0700
commit1f63848ca9fb01336f04b41434de1cc06a5b3d93 (patch)
tree2affa3041863be365f33d99e1f32bda60cf93a32 /src/routes/(app)/send/invoice
parent6e48c584605bec5623c12c470d04d07303983801 (diff)
downloadcoinos-ui-1f63848ca9fb01336f04b41434de1cc06a5b3d93.tar.gz
coinos-ui-1f63848ca9fb01336f04b41434de1cc06a5b3d93.zip
move routes
Diffstat (limited to 'src/routes/(app)/send/invoice')
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.server.ts6
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.svelte4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts
index ed0198cf..fa7d28dd 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.server.ts
+++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts
@@ -7,15 +7,15 @@ export async function load({ params: { id }, parent }) {
let invoice = await get(`/invoice/${id}`);
if (invoice.prompt && invoice.tip === null)
- redirect(307, `/${invoice.user.username}/invoice/${id}/tip`);
+ redirect(307, `/invoice/${id}/tip`);
if (invoice.memoPrompt && invoice.memo === null)
- redirect(307, `/${invoice.user.username}/invoice/${id}/memo`);
+ redirect(307, `/invoice/${id}/memo`);
if (invoice.user.username === user?.username)
error(500, { message: "Cannot send to self" });
- if (!user) redirect(307, `/${invoice.user.username}/invoice/${id}`);
+ if (!user) redirect(307, `/invoice/${id}`);
return { invoice, rates, user };
}
diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte
index 81a2c521..75e4e75a 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.svelte
+++ b/src/routes/(app)/send/invoice/[id]/+page.svelte
@@ -52,7 +52,7 @@
let toggle = () => (submitting = !submitting);
let external = async () => {
- let { id } = await post(`/${recipient.username}/invoice`, {
+ let { id } = await post(`/invoice`, {
invoice: {
...invoice,
type: "lightning",
@@ -62,7 +62,7 @@
user: { username: recipient.username },
});
- goto(`/${recipient.username}/invoice/${id}?options=true`, {
+ goto(`/invoice/${id}?options=true`, {
invalidateAll: true,
});
};