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;