mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-22 21:14:53 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -10,19 +10,19 @@ namespace OpenWifi {
|
||||
void RESTAPI_capabilities_handler::DoGet() {
|
||||
CapabilitiesCache_t Caps = CapabilitiesCache()->AllCapabilities();
|
||||
|
||||
Poco::JSON::Array ObjArr;
|
||||
for(const auto &[deviceType,capabilities]:Caps) {
|
||||
Poco::JSON::Array ObjArr;
|
||||
for (const auto &[deviceType, capabilities] : Caps) {
|
||||
// std::cout << "C:" << to_string(capabilities) << std::endl;
|
||||
Poco::JSON::Object Inner;
|
||||
Inner.set("deviceType",deviceType);
|
||||
Poco::JSON::Parser P;
|
||||
Poco::JSON::Object Inner;
|
||||
Inner.set("deviceType", deviceType);
|
||||
Poco::JSON::Parser P;
|
||||
auto R = P.parse(to_string(capabilities)).extract<Poco::JSON::Object::Ptr>();
|
||||
Inner.set("capabilities", R);
|
||||
ObjArr.add(Inner);
|
||||
}
|
||||
Poco::JSON::Object Answer;
|
||||
Poco::JSON::Object Answer;
|
||||
|
||||
Answer.set("device_types",ObjArr);
|
||||
Answer.set("device_types", ObjArr);
|
||||
return ReturnObject(Answer);
|
||||
}
|
||||
}
|
||||
} // namespace OpenWifi
|
||||
Reference in New Issue
Block a user