Delete expense

This commit is contained in:
Sebastien Castiel
2023-12-06 15:08:52 -05:00
parent fee1963284
commit 570aa713b1
8 changed files with 104 additions and 16 deletions

View File

@@ -56,6 +56,14 @@ export async function createExpense(
})
}
export async function deleteExpense(expenseId: string) {
const prisma = await getPrisma()
await prisma.expense.delete({
where: { id: expenseId },
include: { paidFor: true, paidBy: true },
})
}
export async function updateExpense(
groupId: string,
expenseId: string,