Adding removal subscriber

This commit is contained in:
stephb9959
2022-03-07 11:15:01 -08:00
parent 705a183f06
commit 83f9f2b42b
2 changed files with 10 additions and 9 deletions

View File

@@ -37,9 +37,11 @@ namespace OpenWifi{
ProvObjects::InventoryTag Existing;
std::string SerialNumber = GetBinding(RESTAPI::Protocol::SERIALNUMBER,"");
Logger().debug(Poco::format("%s: Retrieving inventory information.",SerialNumber));
if(SerialNumber.empty() || !DB_.GetRecord(RESTAPI::Protocol::SERIALNUMBER,SerialNumber,Existing)) {
return NotFound();
}
Logger().debug(Poco::format("%s,%s: Retrieving inventory information.", Existing.serialNumber, Existing.info.id ));
Poco::JSON::Object Answer;
std::string Arg;

View File

@@ -328,13 +328,13 @@ namespace OpenWifi::ProvObjects {
field_to_json( Obj, "geoCode", geoCode);
field_to_json( Obj, "location", location);
field_to_json( Obj, "contact", contact);
field_to_json( Obj,"deviceConfiguration",deviceConfiguration);
field_to_json( Obj,"rrm",rrm);
field_to_json( Obj,"managementPolicy",managementPolicy);
field_to_json( Obj,"state",state);
field_to_json( Obj,"devClass",devClass);
field_to_json( Obj,"locale",locale);
field_to_json( Obj,"realMacAddress",realMacAddress);
field_to_json( Obj, "deviceConfiguration",deviceConfiguration);
field_to_json( Obj, "rrm",rrm);
field_to_json( Obj, "managementPolicy",managementPolicy);
field_to_json( Obj, "state",state);
field_to_json( Obj, "devClass",devClass);
field_to_json( Obj, "locale",locale);
field_to_json( Obj, "realMacAddress",realMacAddress);
}
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
@@ -345,7 +345,7 @@ namespace OpenWifi::ProvObjects {
field_from_json( Obj,"entity",entity);
field_from_json( Obj,"subscriber",subscriber);
field_from_json( Obj,"deviceType",deviceType);
field_from_json( Obj, "qrCode", qrCode);
field_from_json( Obj,"qrCode", qrCode);
field_from_json( Obj,"geoCode",geoCode);
field_from_json( Obj,"location",location);
field_from_json( Obj,"contact",contact);
@@ -356,7 +356,6 @@ namespace OpenWifi::ProvObjects {
field_from_json( Obj,"devClass",devClass);
field_from_json( Obj,"locale",locale);
field_from_json( Obj,"realMacAddress",realMacAddress);
return true;
} catch(...) {