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>
pull/1769/head^2
Syed Ali Shahbaz 2022-02-10 15:15:27 +05:30 committed by GitHub
parent c4862c4b92
commit 0675ff8762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

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,