mirror of
https://github.com/spliit-app/spliit.git
synced 2025-12-06 09:29:39 +01:00
Delete expense
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user