Error Framework update

This commit is contained in:
stephb9959
2022-05-07 20:18:40 -07:00
parent 84cf98d6a8
commit 75a3e57e9d
25 changed files with 307 additions and 252 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenWifi {
void RESTAPI_op_contact_handler::DoPost() {
auto RawObject = ParseStream();
const auto & RawObject = ParsedBody_;
OpContactDB::RecordName NewObject;
if(!NewObject.from_json(RawObject)) {
return BadRequest(RESTAPI::Errors::InvalidJSONDocument);
@@ -68,7 +68,7 @@ namespace OpenWifi {
return BadRequest(RESTAPI::Errors::MissingUUID);
}
auto RawObject = ParseStream();
const auto & RawObject = ParsedBody_;
OpContactDB::RecordName UpdateObj;
if(!UpdateObj.from_json(RawObject)) {
return BadRequest(RESTAPI::Errors::InvalidJSONDocument);