diff options
| author | Adam Soltys <[email protected]> | 2024-08-20 16:13:18 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-20 16:13:18 -0700 |
| commit | 82bfc413665ced2a8a822ec7c54c94ecaba80aa3 (patch) | |
| tree | c438cb108b32ce2100ff6659791cf283c9b0eeea /src/routes/(app)/voucher | |
| parent | db4d8e9095cc49f728ae2d6974905a19dd0f8552 (diff) | |
| download | coinos-ui-82bfc413665ced2a8a822ec7c54c94ecaba80aa3.tar.gz coinos-ui-82bfc413665ced2a8a822ec7c54c94ecaba80aa3.zip | |
show spent ecash
Diffstat (limited to 'src/routes/(app)/voucher')
| -rw-r--r-- | src/routes/(app)/voucher/[...token]/+page.server.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/voucher/[...token]/+page.server.js b/src/routes/(app)/voucher/[...token]/+page.server.js index 5f90ba64..b7a69d67 100644 --- a/src/routes/(app)/voucher/[...token]/+page.server.js +++ b/src/routes/(app)/voucher/[...token]/+page.server.js @@ -11,7 +11,7 @@ export async function load({ cookies, params, parent, request, url }) { if (!user) redirect(307, `/register?redirect=${url.pathname}`); let { token } = params; - if (!token.startsWith("cashu")) token = await get(`/cash/${token}`); + if (!token?.startsWith("cashu")) ({ token } = await get(`/cash/${token}`)); await parse(token, url.host, cookies); if (token) error(409, "Token could not be redeemed. Was it already spent?"); |
