🐛 add env to useDb and apply prettier
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 13:28:26 +02:00
parent 67727f96ab
commit cbe1b42f6e
54 changed files with 5492 additions and 2406 deletions
+11 -8
View File
@@ -1,12 +1,15 @@
import { calculateBalances } from '~~/shared/utils/balances'
import { calculateBalances } from '~~/shared/utils/balances';
export default defineEventHandler(async (event) => {
const slug = getRouterParam(event, 'slug')!
const slug = getRouterParam(event, 'slug')!;
const pot = await getPotOrThrow(slug)
const participants = await getParticipants(slug)
const expenses = await getExpensesWithParticipants(slug)
const { netBalances, settlements } = calculateBalances(participants, expenses)
const pot = await getPotOrThrow(slug);
const participants = await getParticipants(slug);
const expenses = await getExpensesWithParticipants(slug);
const { netBalances, settlements } = calculateBalances(
participants,
expenses,
);
return { pot, participants, expenses, netBalances, settlements }
})
return { pot, participants, expenses, netBalances, settlements };
});