diff --git a/src/RESTAPI/RESTAPI_default_configuration.cpp b/src/RESTAPI/RESTAPI_default_configuration.cpp index 33b605a3..9ada772f 100644 --- a/src/RESTAPI/RESTAPI_default_configuration.cpp +++ b/src/RESTAPI/RESTAPI_default_configuration.cpp @@ -65,6 +65,10 @@ namespace OpenWifi { return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters); } + if(DefConfig.configuration.empty()) { + return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters); + } + std::string Error; if (!ValidateUCentralConfiguration(ConfigurationValidator::GetType(DefConfig.platform), DefConfig.configuration, Error, diff --git a/src/RESTObjects/RESTAPI_GWobjects.cpp b/src/RESTObjects/RESTAPI_GWobjects.cpp index adabb0d6..621b4f94 100644 --- a/src/RESTObjects/RESTAPI_GWobjects.cpp +++ b/src/RESTObjects/RESTAPI_GWobjects.cpp @@ -249,7 +249,7 @@ namespace OpenWifi::GWObjects { field_from_json(Obj, "description", description); field_from_json(Obj, "created", created); field_from_json(Obj, "lastModified", lastModified); - field_from_json(Obj, "Platform", platform); + field_from_json(Obj, "platform", platform); return true; } catch (const Poco::Exception &E) { }