fix: don't send request reminder for unpaid bookings (#10325)
Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
1 parent
428e330301
commit
0d1ab6ade9
1 file changed
+11
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user