获取 Codex2API 服务列表
(
db: Session,
enabled: Optional[bool] = None,
)
| 844 | |
| 845 | |
| 846 | def get_codex2api_services( |
| 847 | db: Session, |
| 848 | enabled: Optional[bool] = None, |
| 849 | ) -> List[Codex2ApiService]: |
| 850 | """获取 Codex2API 服务列表""" |
| 851 | query = db.query(Codex2ApiService) |
| 852 | if enabled is not None: |
| 853 | query = query.filter(Codex2ApiService.enabled == enabled) |
| 854 | return query.order_by(asc(Codex2ApiService.priority), asc(Codex2ApiService.id)).all() |
| 855 | |
| 856 | |
| 857 | def update_codex2api_service( |