Get token call logic configuration.
(token: str = Depends(verify_admin_token))
| 1388 | |
| 1389 | @router.get("/api/call-logic/config") |
| 1390 | async def get_call_logic_config(token: str = Depends(verify_admin_token)): |
| 1391 | """Get token call logic configuration.""" |
| 1392 | config_obj = await db.get_call_logic_config() |
| 1393 | call_mode = getattr(config_obj, "call_mode", None) |
| 1394 | if call_mode not in ("default", "polling"): |
| 1395 | call_mode = "polling" if getattr(config_obj, "polling_mode_enabled", False) else "default" |
| 1396 | return { |
| 1397 | "success": True, |
| 1398 | "config": { |
| 1399 | "call_mode": call_mode, |
| 1400 | "polling_mode_enabled": call_mode == "polling", |
| 1401 | } |
| 1402 | } |
| 1403 | |
| 1404 | |
| 1405 | @router.post("/api/call-logic/config") |
nothing calls this directly
no test coverage detected