()
| 210 | |
| 211 | @app.get("/api/config") |
| 212 | def config() -> dict: |
| 213 | amap_key = os.environ.get("AMAP_KEY") or os.environ.get("VITE_AMAP_KEY") or "" |
| 214 | amap_security = ( |
| 215 | os.environ.get("AMAP_SECURITY_CODE") |
| 216 | or os.environ.get("VITE_AMAP_SECURITY_CODE") |
| 217 | or "" |
| 218 | ) |
| 219 | return { |
| 220 | "has_amap": bool(amap_key and amap_security), |
| 221 | "amap_key": amap_key, |
| 222 | "amap_security_code": amap_security, |
| 223 | "max_accuracy_m": MAX_ACCURACY_M, |
| 224 | "max_speed_mps": MAX_SPEED_MPS, |
| 225 | } |
| 226 | |
| 227 | |
| 228 | @app.post("/api/geo/convert") |
nothing calls this directly
no outgoing calls
no test coverage detected