Debugging

This commit is contained in:
stephb9959
2022-02-25 00:15:17 -08:00
parent caebebdb64
commit 347fa7825f

View File

@@ -81,14 +81,18 @@ namespace OpenWifi{
BadRequest(RESTAPI::Errors::NameMustBeSet);
return false;
}
auto Blocks = P.parse(i.configuration).extract<Poco::JSON::Object::Ptr>();
auto N = Blocks->getNames();
for(const auto &j:N) {
if(std::find(SectionNames.cbegin(),SectionNames.cend(),j)==SectionNames.cend()) {
std::cout << "Block section name rejected: " << j << std::endl;
BadRequest(RESTAPI::Errors::ConfigBlockInvalid);
return false;
try {
auto Blocks = P.parse(i.configuration).extract<Poco::JSON::Object::Ptr>();
auto N = Blocks->getNames();
for (const auto &j: N) {
if (std::find(SectionNames.cbegin(), SectionNames.cend(), j) == SectionNames.cend()) {
std::cout << "Block section name rejected: " << j << std::endl;
BadRequest(RESTAPI::Errors::ConfigBlockInvalid);
return false;
}
}
} catch (...) {
std::cout << "Failed parsing block" << std::endl;
}
try {