move tabs into own pages
tinyedge/deploy Deployed by TinyEdge

This commit is contained in:
2026-08-07 15:49:43 +02:00
parent cbe1b42f6e
commit 99a9f908f1
13 changed files with 321 additions and 325 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ export interface ExpenseWithDetails {
}
export async function getPotOrThrow(slug: string) {
const db = useDb(event);
const db = useDb();
const [pot] = await db.select().from(pots).where(eq(pots.slug, slug));
if (!pot) {
throw createError({ statusCode: 404, statusMessage: 'Pot not found' });
@@ -27,14 +27,14 @@ export async function getPotOrThrow(slug: string) {
}
export async function getParticipants(slug: string) {
const db = useDb(event);
const db = useDb();
return db.select().from(participants).where(eq(participants.potSlug, slug));
}
export async function getExpensesWithParticipants(
slug: string,
): Promise<ExpenseWithDetails[]> {
const db = useDb(event);
const db = useDb();
const expenseRows = await db
.select()
.from(expenses)