New and imporved!
This commit is contained in:
20
src/routes/+page.server.js
Normal file
20
src/routes/+page.server.js
Normal file
@ -0,0 +1,20 @@
|
||||
import {
|
||||
getLast30DaysTransactionsSums,
|
||||
getUnallocatedTransactions,
|
||||
getUnderallocatedTransactions,
|
||||
getTotal,
|
||||
getBudgets,
|
||||
getAllBudgetTransactions
|
||||
} from '$lib/db';
|
||||
|
||||
|
||||
export async function load({ params }) {
|
||||
const unallocatedTrans = await getUnallocatedTransactions();
|
||||
const underAllocatedTrans = await getUnderallocatedTransactions();
|
||||
const total = await getTotal();
|
||||
const budgets = await getBudgets();
|
||||
const budgetTransactions = await getAllBudgetTransactions();
|
||||
const last30DaysTransactionsSums = await getLast30DaysTransactionsSums();
|
||||
|
||||
return { unallocatedTrans, underAllocatedTrans, total, budgets, budgetTransactions, last30DaysTransactionsSums };
|
||||
}
|
||||
Reference in New Issue
Block a user