Skip to content

Commit

Permalink
/zones now returns the map instead of array of key:value (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
climategadgets committed Sep 4, 2024
1 parent 95efd11 commit c502911
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ public Mono<ServerResponse> getZones(ServerRequest ignoredRq) {
return ok()
.cacheControl(CacheControl.noCache())
.contentType(MediaType.APPLICATION_JSON)
.body(Flux.fromIterable(unit2observer.values())
.flatMap(UnitObserver::getZones),
ZoneStatus.class);
.body(Flux
.fromIterable(unit2observer.values())
.flatMap(UnitObserver::getZones)
.collectMap(Map.Entry::getKey, Map.Entry::getValue),
Map.class);
}

/**
Expand Down

0 comments on commit c502911

Please sign in to comment.