kinda there

This commit is contained in:
2025-07-18 23:02:01 -04:00
parent 3e7572f3a3
commit 3225ebb986
28 changed files with 1665 additions and 475 deletions

View File

@ -1,15 +1,17 @@
import { error } from '@sveltejs/kit';
import { getAccount, getTransactions } from '$lib/db';
import { getAccount, getTransactions, getBudgets, getBudgetTransactionsForAccount } from '$lib/db';
/** @type {import('./$types').PageServerLoad} */
export async function load({ params }) {
const transactions = await getTransactions(params.slug);
const account = await getAccount(params.slug);
const slug = params.slug;
const slug = params.slug;
const transactions = await getTransactions(slug);
const account = await getAccount(slug);
const budgets = await getBudgets();
const budgetTransactions = await getBudgetTransactionsForAccount(slug);
if (transactions) {
return {transactions, account};
return { transactions, account, budgets, slug, budgetTransactions };
}
error(404, 'Not found');
}