mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-27 18:06:12 +01:00
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import { z } from 'zod'
|
|
import { deleteExpense } from '../../../../lib/api'
|
|
import { baseProcedure } from '../../../init'
|
|
|
|
export const deleteGroupExpenseProcedure = baseProcedure
|
|
.input(
|
|
z.object({
|
|
expenseId: z.string().min(1),
|
|
groupId: z.string().min(1),
|
|
participantId: z.string().optional(),
|
|
}),
|
|
)
|
|
.mutation(async ({ input: { expenseId, groupId, participantId } }) => {
|
|
await deleteExpense(groupId, expenseId, participantId)
|
|
return {}
|
|
})
|