feat(api): standardize REST contracts and auth

This commit is contained in:
2026-07-30 20:38:51 +08:00
parent ae1a657554
commit ba947b616b
86 changed files with 54193 additions and 990 deletions
+4 -4
View File
@@ -29,7 +29,7 @@ async def get_audit_repository(
@router.get(
"/logs",
"/audit-logs",
summary="查询审计日志",
description="查询审计日志(仅管理员)",
response_model=list[AuditLogResponse],
@@ -59,7 +59,7 @@ async def get_audit_logs(
@router.get(
"/logs/count",
"/audit-logs/count",
summary="获取审计日志总数",
description="获取审计日志总数(仅管理员)",
)
@@ -84,7 +84,7 @@ async def get_audit_logs_count(
return {"count": count}
@router.post("/session-events", status_code=status.HTTP_204_NO_CONTENT)
@router.post("/audit-events", status_code=status.HTTP_204_NO_CONTENT)
async def record_session_event(
payload: SessionAuditEventRequest,
request: Request,
@@ -105,7 +105,7 @@ async def record_session_event(
@router.get(
"/logs/my",
"/audit-logs/mine",
summary="查询我的审计日志",
description="查询当前用户的审计日志",
response_model=list[AuditLogResponse],