删除代理配置
(db: Session, proxy_id: int)
| 609 | |
| 610 | |
| 611 | def delete_proxy(db: Session, proxy_id: int) -> bool: |
| 612 | """删除代理配置""" |
| 613 | db_proxy = get_proxy_by_id(db, proxy_id) |
| 614 | if not db_proxy: |
| 615 | return False |
| 616 | |
| 617 | db.delete(db_proxy) |
| 618 | db.commit() |
| 619 | _ensure_single_default_proxy(db) |
| 620 | return True |
| 621 | |
| 622 | |
| 623 | def update_proxy_last_used(db: Session, proxy_id: int) -> bool: |
nothing calls this directly
no test coverage detected