diff options
| author | Adam Soltys <[email protected]> | 2024-09-20 10:03:30 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-09-20 10:03:30 -0700 |
| commit | fb8510db273f78317a02ca151f7f24a9b8de29ab (patch) | |
| tree | 6ef7f6c272118156076de7a9025d89a8e1a70ce9 /src/routes/(app)/invoice/+page.server.ts | |
| parent | 5c86d9eadaa0021928ea39c7d0e875d0c446280f (diff) | |
| download | coinos-ui-fb8510db273f78317a02ca151f7f24a9b8de29ab.tar.gz coinos-ui-fb8510db273f78317a02ca151f7f24a9b8de29ab.zip | |
rename account_id
Diffstat (limited to 'src/routes/(app)/invoice/+page.server.ts')
| -rw-r--r-- | src/routes/(app)/invoice/+page.server.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/(app)/invoice/+page.server.ts b/src/routes/(app)/invoice/+page.server.ts index 98bbe8c3..7bac3f9b 100644 --- a/src/routes/(app)/invoice/+page.server.ts +++ b/src/routes/(app)/invoice/+page.server.ts @@ -3,18 +3,18 @@ import { error, redirect } from "@sveltejs/kit"; import type { Invoice } from "$lib/types"; export let load = async ({ cookies, parent }) => { - let account_id = cookies.get("account_id"); + let aid = cookies.get("aid"); let { subject, user, rates } = await parent(); let invoice: Invoice = { - account_id, + aid, rate: rates[user?.currency || subject?.currency], }; if (!user) user = subject; try { - invoice = await post("/invoice", { invoice, account_id, user }, auth(cookies)); + invoice = await post("/invoice", { invoice, aid, user }, auth(cookies)); } catch (e) { console.log(e); error(500, "Failed to generate invoice"); |
