mirror of
https://github.com/Telecominfraproject/wlan-cloud-analytics.git
synced 2026-03-20 03:39:59 +00:00
Hardening stats
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
|
||||
namespace OpenWifi {
|
||||
void RESTAPI_board_list_handler::DoGet() {
|
||||
auto forVenue = GetParameter("forVenue","");
|
||||
|
||||
if(!forVenue.empty()) {
|
||||
std::vector<AnalyticsObjects::BoardInfo> Boards;
|
||||
auto F = [&](const AnalyticsObjects::BoardInfo &B) -> bool {
|
||||
if(!B.venueList.empty()) {
|
||||
for(const auto &venue:B.venueList) {
|
||||
if(venue.id == forVenue) {
|
||||
Boards.emplace_back(B);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
DB_.Iterate(F);
|
||||
return ReturnObject("boards",Boards);
|
||||
}
|
||||
|
||||
return ListHandler<BoardsDB>("boards", DB_, *this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user