Adding MAP API.

This commit is contained in:
stephb9959
2021-11-11 13:25:08 -08:00
parent afd26394e4
commit ec472dcb51
2 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ namespace OpenWifi{
void RESTAPI_map_handler::DoGet() {
ProvObjects::Map Existing;
std::string UUID = GetBinding(RESTAPI::Protocol::ID,"");
std::string UUID = GetBinding(RESTAPI::Protocol::UUID,"");
if(UUID.empty() || !DB_.GetRecord(RESTAPI::Protocol::ID,UUID,Existing)) {
return NotFound();
}
@@ -31,7 +31,7 @@ namespace OpenWifi{
void RESTAPI_map_handler::DoDelete() {
ProvObjects::Map Existing;
std::string UUID = GetBinding(RESTAPI::Protocol::ID,"");
std::string UUID = GetBinding(RESTAPI::Protocol::UUID,"");
if(UUID.empty() || !DB_.GetRecord(RESTAPI::Protocol::ID,UUID,Existing)) {
return NotFound();
}
@@ -51,7 +51,7 @@ namespace OpenWifi{
}
void RESTAPI_map_handler::DoPost() {
std::string UUID = GetBinding(RESTAPI::Protocol::ID,"");
std::string UUID = GetBinding(RESTAPI::Protocol::UUID,"");
if(UUID.empty()) {
return BadRequest(RESTAPI::Errors::MissingUUID);
}