updated event object to hold rejection reason (#1777)

* updated event object to hold rejection reason

* lint fix

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
This commit is contained in:
Syed Ali Shahbaz
2022-02-10 09:45:27 +00:00
committed by GitHub
co-authored by Bailey Pumfleet
parent c4862c4b92
commit 0675ff8762
+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,