Fixing discrepencies in object manipulation.

This commit is contained in:
stephb9959
2021-10-25 11:17:49 -07:00
parent 20960ac00e
commit 547cee2eaa
13 changed files with 44 additions and 64 deletions

View File

@@ -437,4 +437,14 @@ namespace OpenWifi::ProvObjects {
return false;
}
bool UpdateObjectInfo(const Poco::JSON::Object::Ptr &O, const SecurityObjects::UserInfo &U, ObjectInfo &I) {
if(O->has("name"))
I.name = O->get("name").toString();
if(O->has("description"))
I.description = O->get("description").toString();
SecurityObjects::MergeNotes(O,U,I.notes);
I.modified = std::time(nullptr);
return true;
}
};