Fixing a few bugs and typos.

This commit is contained in:
stephb9959
2022-04-15 08:06:10 -04:00
parent 25a7b546ae
commit 3a758b6fbd
5 changed files with 14 additions and 17 deletions

View File

@@ -1112,16 +1112,6 @@ components:
defaultOperator:
type: boolean
default: false
locations:
type: array
items:
type: string
format: uuid
contacts:
type: array
items:
type: string
format: uuid
rrm:
type: string
enum:

View File

@@ -62,10 +62,9 @@ namespace OpenWifi {
}
void RESTAPI_op_contact_handler::DoPut() {
auto uuid = GetBinding("uuid","");
auto uuid = GetBinding("uuid");
OpContactDB::RecordName Existing;
if(uuid.empty() || DB_.GetRecord("id",uuid,Existing)) {
if(uuid.empty() || !DB_.GetRecord("id",uuid,Existing)) {
return BadRequest(RESTAPI::Errors::MissingUUID);
}

View File

@@ -61,10 +61,9 @@ namespace OpenWifi {
}
void RESTAPI_op_location_handler::DoPut() {
auto uuid = GetBinding("uuid","");
auto uuid = GetBinding("uuid");
OpLocationDB::RecordName Existing;
if(uuid.empty() || DB_.GetRecord("id",uuid,Existing)) {
if(uuid.empty() || !DB_.GetRecord("id",uuid,Existing)) {
return BadRequest(RESTAPI::Errors::MissingUUID);
}

View File

@@ -98,7 +98,7 @@ namespace OpenWifi {
return ReturnObject(Answer);
}
return InternalError("Failed creating operatpr.");
return InternalError("Failed creating operator.");
}
void RESTAPI_operators_handler::DoPut() {

View File

@@ -110,3 +110,12 @@ template<> void ORM::DB< OpenWifi::SubDeviceDBRecordType, OpenWifi::ProvObjec
Out.set<21>(In.suspended);
Out.set<22>(In.realMacAddress);
}
/*
$ cmake3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DLibCrypto_INCLUDE_DIR=/usr/include -DLibCrypto_LIBRARY=/usr/lib64/libcrypto.so ..
*/