summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
authorGrant Limberg <[email protected]>2023-08-28 08:10:17 -0700
committerGrant Limberg <[email protected]>2023-08-28 08:10:17 -0700
commitc974a159af406bf016f141eee0d046bca32fd9c3 (patch)
tree31030048e55b6451a3e2cefb9655ac73cc4fb4a0 /controller
parent54efb62731955ac372a9fde311d3bb9c3303db72 (diff)
fix for issue #2114
Diffstat (limited to 'controller')
-rw-r--r--controller/EmbeddedNetworkController.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index ac1947ce..85fbb4dc 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
return;
}
- json out = json::array();
+ json out = json::object();
std::vector<json> memTmp;
if (_db.get(nwid, network, memTmp)) {
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
int revision = OSUtils::jsonInt((*m)["revision"], 0);
std::string id = OSUtils::jsonString((*m)["id"], "");
if (id.length() == 10) {
- json tmp = json::object();
- tmp[id] = revision;
- out.push_back(tmp);
+ out[id] = revision;
}
}
}