diff options
| author | Adam Soltys <[email protected]> | 2025-07-25 19:35:17 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-07-25 19:35:17 -0700 |
| commit | f24ec95a246ab38bb3253425fd8446dd93176fe9 (patch) | |
| tree | 205587f33614157ffc5aecfe1959a7dbdadbaaea /src | |
| parent | 476418f9711ac91760a9ca279a6e671d88e70fc3 (diff) | |
| download | coinos-ui-f24ec95a246ab38bb3253425fd8446dd93176fe9.tar.gz coinos-ui-f24ec95a246ab38bb3253425fd8446dd93176fe9.zip | |
authorizations
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/fund/[id]/sweep/[...amount]/+page.server.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/routes/(app)/fund/[id]/sweep/[...amount]/+page.server.ts b/src/routes/(app)/fund/[id]/sweep/[...amount]/+page.server.ts index 8a8e71ee..d0e49fcc 100644 --- a/src/routes/(app)/fund/[id]/sweep/[...amount]/+page.server.ts +++ b/src/routes/(app)/fund/[id]/sweep/[...amount]/+page.server.ts @@ -36,10 +36,13 @@ export async function load({ cookies, request, params, parent }) { await register(user, ip, cookies, `/fund/${id}/sweep`); } + let r; try { - await post("/take", { amount, id }, auth(cookies)); + r = await post("/take", { amount, id }, auth(cookies)); } catch (e) { redirect(307, `/fund/${id}`); } + + if (r) redirect(307, `/${user.username}`); return { amount, currency, id, rate, rates, password }; } |
