Patrick
07/09/2022, 12:11 PMconst [configDelete, billingDelete, userUpdate] = await prisma.$transaction([
prisma.config.delete({
where: { uid }
}),
prisma.billing.delete({
where: { uid }
}),
prisma.user.update({
where: { id: uid },
data: {
trialDays: 0
}
})
])
nikolasburk
Right now it throws error when any of those do not exists. Is there better way to do this?
update
and delete
always throw RecordNotFound
exceptions when a record doesn’t exist, so as far as I can tell there’s not really a better way here 🙂Patrick
07/11/2022, 5:34 PM