Skip to content

Commit

Permalink
feat(place/attendee_scanner): less redirection
Browse files Browse the repository at this point in the history
when obtaining the list of systems (go direct to the source)
  • Loading branch information
stakach committed Dec 19, 2024
1 parent 8e25558 commit a76323c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/place/attendee_scanner.cr
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class Place::AttendeeScanner < PlaceOS::Driver
@org_id = nil
end

# Grabs the list of systems in the building
getter systems : Hash(String, Array(String)) do
locations.systems.get.as_h.transform_values(&.as_a.map(&.as_s))
end

getter building_id : String do
locations.building_id.get.as_s
end

# Grabs the list of systems in the building
getter systems : Hash(String, Array(String)) do
staff_api.systems_in_building(building_id).get.as_h.transform_values(&.as_a.map(&.as_s))
end

getter org_id : String do
building_details = staff_api.zone(building_id).get

Expand Down

0 comments on commit a76323c

Please sign in to comment.