Merge pull request #231 from pyMC-dev/pr-227

Pr 227
This commit is contained in:
Lloyd
2026-05-06 16:13:30 +01:00
committed by GitHub
8 changed files with 674 additions and 111 deletions
+7
View File
@@ -1209,6 +1209,13 @@ class APIEndpoints:
for i, b in enumerate(brokers):
if not isinstance(b, dict):
return self._error(f"Broker at index {i} must be an object")
# Bundled preset reference: {preset: <name>}. Pass through
# unchanged - the MQTT handler expands it on next start.
if "preset" in b and "name" not in b:
validated.append({"preset": str(b["preset"]).strip()})
continue
for field in ("name", "host", "port", "format"):
if not b.get(field, ""):
return self._error(f"Broker at index {i} missing required field: {field}")