Update bookingReminder.ts (#3007)

pull/2968/head^2
Omar López 2022-06-08 02:37:06 -06:00 committed by GitHub
parent 33a4bb797d
commit 3a2224a4e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
createdAt: { createdAt: {
lte: dayjs().add(-interval, "minutes").toDate(), lte: dayjs().add(-interval, "minutes").toDate(),
}, },
// Only send reminders if the event hasn't finished
endTime: { gte: new Date() },
}, },
select: { select: {
...bookingMinimalSelect, ...bookingMinimalSelect,