mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Add /subdevice serial number lookup.
This commit is contained in:
@@ -15,8 +15,16 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProvObjects::SubscriberDevice SD;
|
ProvObjects::SubscriberDevice SD;
|
||||||
if(!DB_.GetRecord("id",uuid,SD)) {
|
if(Utils::ValidUUID(uuid)) {
|
||||||
return NotFound();
|
if (!DB_.GetRecord("id", uuid, SD)) {
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
} else if(Utils::ValidSerialNumber(uuid)) {
|
||||||
|
if (!DB_.GetRecord("serialNumber", uuid, SD)) {
|
||||||
|
return NotFound();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
Poco::JSON::Object Answer;
|
Poco::JSON::Object Answer;
|
||||||
|
|||||||
Reference in New Issue
Block a user