Skip to content

Commit 72533cb

Browse files
authored
Merge pull request #2115 from zerotier/gh-2114
fix for issue #2114
2 parents 54efb62 + c974a15 commit 72533cb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

controller/EmbeddedNetworkController.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
997997
return;
998998
}
999999

1000-
json out = json::array();
1000+
json out = json::object();
10011001
std::vector<json> memTmp;
10021002
if (_db.get(nwid, network, memTmp)) {
10031003
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
10041004
int revision = OSUtils::jsonInt((*m)["revision"], 0);
10051005
std::string id = OSUtils::jsonString((*m)["id"], "");
10061006
if (id.length() == 10) {
1007-
json tmp = json::object();
1008-
tmp[id] = revision;
1009-
out.push_back(tmp);
1007+
out[id] = revision;
10101008
}
10111009
}
10121010
}

0 commit comments

Comments
 (0)