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:
parent
c4862c4b92
commit
0675ff8762
1 changed files with 1 additions and 0 deletions
|
@ -187,6 +187,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||||
} else {
|
} else {
|
||||||
await refund(booking, evt);
|
await refund(booking, evt);
|
||||||
const rejectionReason = asStringOrNull(req.body.reason) || "";
|
const rejectionReason = asStringOrNull(req.body.reason) || "";
|
||||||
|
evt.rejectionReason = rejectionReason;
|
||||||
await prisma.booking.update({
|
await prisma.booking.update({
|
||||||
where: {
|
where: {
|
||||||
id: bookingId,
|
id: bookingId,
|
||||||
|
|
Loading…
Reference in a new issue