From d9b4c0ad15f6527da26cdd72251d2c2a8efe3d55 Mon Sep 17 00:00:00 2001 From: Stephen von Takach Date: Tue, 22 Aug 2023 21:14:43 +1000 Subject: [PATCH] fix(booking_approver): query should pass unix time --- drivers/place/booking_approver.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/place/booking_approver.cr b/drivers/place/booking_approver.cr index fe2958800d..9e7a81d1b6 100644 --- a/drivers/place/booking_approver.cr +++ b/drivers/place/booking_approver.cr @@ -69,7 +69,7 @@ class Place::BookingApprover < PlaceOS::Driver booking_type = @approve_booking_types[0]? || "desk" bookings = Array(Booking).from_json staff_api.query_bookings( type: booking_type, - created_after: 12.hours.ago, + created_after: 12.hours.ago.to_unix, zones: [get_building_id], approved: false ).get.to_json @@ -77,6 +77,7 @@ class Place::BookingApprover < PlaceOS::Driver booking.action = "create" approve_booking booking end + "found #{bookings.size} missed" end def status