diff options
| author | Adam Soltys <[email protected]> | 2022-10-17 15:31:08 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-10-17 15:31:08 -0700 |
| commit | 5e3d4133760962db28c4f3a595f0566bd59391ff (patch) | |
| tree | 8a6c360bfa818ddf2b3724c926c3e5f8ceab374c /src/routes/launch/purchase/+page.server.js | |
| parent | b45baf7b603c19af7c9f0c98a0df291ca2c305a8 (diff) | |
| download | coinos-ui-5e3d4133760962db28c4f3a595f0566bd59391ff.tar.gz coinos-ui-5e3d4133760962db28c4f3a595f0566bd59391ff.zip | |
thanks page
Diffstat (limited to 'src/routes/launch/purchase/+page.server.js')
| -rw-r--r-- | src/routes/launch/purchase/+page.server.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/routes/launch/purchase/+page.server.js b/src/routes/launch/purchase/+page.server.js index 03da1e35..b9b20f28 100644 --- a/src/routes/launch/purchase/+page.server.js +++ b/src/routes/launch/purchase/+page.server.js @@ -1,5 +1,6 @@ import { auth, get, post } from '$lib/utils'; import tickets from '$lib/tickets'; +import { redirect } from "@sveltejs/kit"; export const load = async ({ parent }) => { let p = await parent(); @@ -11,7 +12,7 @@ export const actions = { internal: async ({ cookies, request, parent }) => { let { ticket } = Object.fromEntries(await request.formData()); - let r = await post( + let { asset } = await post( '/assets', { name: `Launch Party Ticket ${ticket}`, @@ -25,7 +26,7 @@ export const actions = { auth(cookies) ); - console.log(r); + throw redirect(307, `/launch/thanks/${asset}`); }, lightning: async ({ cookies, request }) => { |
