Adding parsing of variable blocks

This commit is contained in:
stephb9959
2022-03-08 09:14:20 -08:00
parent 244cc423b8
commit 87cdc894e4

View File

@@ -273,11 +273,13 @@ namespace OpenWifi{
Existing.deviceConfiguration = "";
}
Existing.subscriber = "";
nlohmann::json state;
state["date"] = OpenWifi::Now();
state["method"] = "auto-discovery";
state["last-operation"] = "returned to inventory";
Existing.state = state.get<std::string>();
Poco::JSON::Object state;
state.set("date",OpenWifi::Now());
state.set("method","auto-discovery");
state.set("last-operation", "returned to inventory");
std::ostringstream OO;
state.stringify(OO);
Existing.state = OO.str();
StorageService()->InventoryDB().UpdateRecord("id",Existing.info.id,Existing);
Poco::JSON::Object Answer;
Existing.to_json(Answer);