fix: don't send request reminder for unpaid bookings (#10325)
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>pull/10597/head^2
parent
428e330301
commit
0d1ab6ade9
|
@ -31,6 +31,17 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
},
|
||||
// Only send reminders if the event hasn't finished
|
||||
endTime: { gte: new Date() },
|
||||
OR: [
|
||||
// no payment required
|
||||
{
|
||||
payment: { none: {} },
|
||||
},
|
||||
// paid but awaiting approval
|
||||
{
|
||||
payment: { some: {} },
|
||||
paid: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
select: {
|
||||
...bookingMinimalSelect,
|
||||
|
|
Loading…
Reference in New Issue