Skip to content

Commit

Permalink
fix(booking_approver): query should pass unix time
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Aug 22, 2023
1 parent 3d2c2ee commit d9b4c0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/place/booking_approver.cr
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ 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
bookings.each do |booking|
booking.action = "create"
approve_booking booking
end
"found #{bookings.size} missed"
end

def status
Expand Down

0 comments on commit d9b4c0a

Please sign in to comment.