updated event object to hold rejection reason (#1777)

* updated event object to hold rejection reason

* lint fix

Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
Syed Ali ShahbazandBailey Pumfleet authored and GitHub committed 2022-02-10 09:45:27 +00:00
1 parent c4862c4b92
commit 0675ff8762
1 file changed
+1
+1
View File
@@ -187,6 +187,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
} else {
await refund(booking, evt);
const rejectionReason = asStringOrNull(req.body.reason) || "";
evt.rejectionReason = rejectionReason;
await prisma.booking.update({
where: {
id: bookingId,