Get zones from environment or use defaults.
()
| 348 | |
| 349 | |
| 350 | def get_configured_zones(): |
| 351 | """Get zones from environment or use defaults.""" |
| 352 | zones_json = os.environ.get("MOCK_ZONES") |
| 353 | if zones_json: |
| 354 | try: |
| 355 | return json.loads(zones_json) |
| 356 | except json.JSONDecodeError: |
| 357 | print("Warning: Invalid MOCK_ZONES JSON, using defaults") |
| 358 | return DEFAULT_ZONES |
| 359 | |
| 360 | |
| 361 | @app.route("/client/v4/zones", methods=["GET"]) |
no test coverage detected