```
feat: 添加飞书集成和审计API密钥认证 - 在数据库配置中添加飞书模型导入 - 添加审计API密钥配置项和认证中间件 - 实现飞书事件重复处理防止机制 - 为审批路由添加API密钥认证 - 优化AI适配器错误处理并添加JSON解析异常捕获 - 更新测试用例以包含新的认证和事件处理逻辑 ```
This commit is contained in:
@@ -23,12 +23,19 @@ def list_approvals(
|
||||
status: str | None = None,
|
||||
limit: int = Query(default=100, ge=1, le=500),
|
||||
db: Session = Depends(get_db),
|
||||
principal: ApiPrincipal = Depends(require_approval_api_key),
|
||||
):
|
||||
_ = principal
|
||||
return ApprovalService(db).list(status_filter=status, limit=limit)
|
||||
|
||||
|
||||
@router.get("/{ticket_id}", response_model=ApprovalRead)
|
||||
def get_approval(ticket_id: str, db: Session = Depends(get_db)):
|
||||
def get_approval(
|
||||
ticket_id: str,
|
||||
db: Session = Depends(get_db),
|
||||
principal: ApiPrincipal = Depends(require_approval_api_key),
|
||||
):
|
||||
_ = principal
|
||||
return ApprovalService(db).get_by_ticket(ticket_id)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user