🎉 init

This commit is contained in:
2026-07-01 15:43:18 +02:00
commit 2f492c55be
64 changed files with 11645 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { calculateBalances } from '../../../shared/utils/balances'
export default defineEventHandler(async (event) => {
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)
return { pot, participants, expenses, netBalances, settlements }
})