We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 54efb62 + c974a15 commit 72533cbCopy full SHA for 72533cb
controller/EmbeddedNetworkController.cpp
@@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
997
return;
998
}
999
1000
- json out = json::array();
+ json out = json::object();
1001
std::vector<json> memTmp;
1002
if (_db.get(nwid, network, memTmp)) {
1003
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
1004
int revision = OSUtils::jsonInt((*m)["revision"], 0);
1005
std::string id = OSUtils::jsonString((*m)["id"], "");
1006
if (id.length() == 10) {
1007
- json tmp = json::object();
1008
- tmp[id] = revision;
1009
- out.push_back(tmp);
+ out[id] = revision;
1010
1011
1012
0 commit comments