(request: Request)
| 231 | |
| 232 | @app.get("/api/settings", tags=["settings"]) |
| 233 | def get_settings(request: Request) -> dict[str, object]: |
| 234 | # LAN addresses other devices can use — loopback excluded (only works on the |
| 235 | # host). The port is whatever this request came in on. |
| 236 | port = request.url.port or 8000 |
| 237 | addresses = sorted(f"http://{ip}:{port}" for ip in _local_ips() if _is_lan_ipv4(ip)) |
| 238 | return {**_settings_payload(), "lan_addresses": addresses} |
| 239 | |
| 240 | |
| 241 | @app.post("/api/settings", tags=["settings"]) |
nothing calls this directly
no test coverage detected