Update admin configuration (error_ban_threshold)
(
request: UpdateAdminConfigRequest,
token: str = Depends(verify_admin_token)
)
| 1560 | |
| 1561 | @router.post("/api/admin/config") |
| 1562 | async def update_admin_config( |
| 1563 | request: UpdateAdminConfigRequest, |
| 1564 | token: str = Depends(verify_admin_token) |
| 1565 | ): |
| 1566 | """Update admin configuration (error_ban_threshold)""" |
| 1567 | # Update error_ban_threshold in database |
| 1568 | await db.update_admin_config(error_ban_threshold=request.error_ban_threshold) |
| 1569 | |
| 1570 | return {"success": True, "message": "配置更新成功"} |
| 1571 | |
| 1572 | |
| 1573 | @router.post("/api/admin/password") |
nothing calls this directly
no test coverage detected