Skip to content

Commit

Permalink
Merge pull request #74 from VentionCapstone/fix/delete-unnecessary-ch…
Browse files Browse the repository at this point in the history
…eck-booking-cron

fix: remove unnecessary check on booking cron
  • Loading branch information
mirsadikov committed Feb 12, 2024
2 parents 9b1ac04 + 7e37ddd commit 31af864
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/booking/booking.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ export class BookingService {
SELECT b.id
FROM "Booking" b
JOIN "Accommodation" a ON a.id = b."accommodationId"
JOIN "Payment" p ON p.id = b."paymentId"
WHERE p.status = ${Status.COMPLETED}::"Status" AND b.status = ${Status.UPCOMING}::"Status" AND
WHERE b.status = ${Status.UPCOMING}::"Status" AND
b."startDate" + INTERVAL '1 HOUR' * ${STANDARD_CHECKIN_HOUR} <= NOW() AT TIME ZONE 'UTC' - INTERVAL '1 minute' * a."timezoneOffset"
)
UPDATE "Booking" b
Expand Down

0 comments on commit 31af864

Please sign in to comment.