diff options
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/+layout.server.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/(app)/invoice/[id]/+layout.server.ts b/src/routes/(app)/invoice/[id]/+layout.server.ts index df8693be..ab41dddc 100644 --- a/src/routes/(app)/invoice/[id]/+layout.server.ts +++ b/src/routes/(app)/invoice/[id]/+layout.server.ts @@ -19,9 +19,7 @@ export async function load({ cookies, depends, params, url, parent }) { (!amount && (pending || received)) || (amount > 0 && (pending >= amount || received >= amount)); if (paid && !url.pathname.endsWith("paid")) { - if (invoice.uid === user?.id) - redirect(307, `/invoice/${id}/paid` + (options ? "?options=true" : "")); - else redirect(307, `/pay/${subject.username}/${invoice.amount}`); + redirect(307, `/invoice/${id}/paid` + (options ? "?options=true" : "")); } subject = invoice.user; @@ -34,7 +32,9 @@ export async function load({ cookies, depends, params, url, parent }) { ) { if (invoice.prompt && invoice.tip === null) redirect(307, `/invoice/${id}/tip`); - else redirect(307, `/send/invoice/${id}`); + else { + redirect(307, `/send/invoice/${id}`); + } } } |
