Detecting duplicate names.

This commit is contained in:
stephb9959
2021-11-19 10:42:53 -08:00
parent 80b6391e75
commit d064b7c889
2 changed files with 14 additions and 23 deletions

View File

@@ -88,10 +88,11 @@ namespace OpenWifi {
return NotFound();
}
std::string Error;
if (!NewConfig.Configuration.empty())
if (!NewConfig.Configuration.empty()) {
std::string Error;
if(!ValidateUCentralConfiguration(NewConfig.Configuration, Error)) {
return BadRequest(RESTAPI::Errors::ConfigBlockInvalid);
}
Existing.Configuration = NewConfig.Configuration;
}