From 794b31591d0a16c82deb50fe16700be31d3d0b13 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 15 Mar 2024 09:05:21 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-13507 Signed-off-by: stephb9959 --- src/RESTAPI/RESTAPI_default_configuration.cpp | 4 ++++ src/RESTObjects/RESTAPI_GWobjects.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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) { }