fix: 删除查重 API GET/POST 端点中错误的 204 返回 #81

Merged
xiaoxia merged 1 commits from fix/p0-duplication-204-response into develop 2026-06-28 18:11:00 +08:00
Owner

修复内容

删除 apps/api/app/api/routes/duplication.py 中 2 个错误的 return Response(status_code=204) 语句:

  • L209 (get_duplication_detail GET 端点): 删除 — 导致永远返回空 204,正常逻辑被短路
  • L262 (retry_duplication POST 端点): 删除 — 导致永远返回空 204,正常逻辑被短路
  • L241 (delete_duplication_record DELETE 端点): 保留不动 — 204 返回正确

影响

修复前,GET /records/{id} 和 POST /records/{id}/retry 两个端点永远返回 HTTP 204 空响应,前端无法获取查重详情或重新提交查重。

## 修复内容 删除 `apps/api/app/api/routes/duplication.py` 中 2 个错误的 `return Response(status_code=204)` 语句: - **L209** (`get_duplication_detail` GET 端点): 删除 — 导致永远返回空 204,正常逻辑被短路 - **L262** (`retry_duplication` POST 端点): 删除 — 导致永远返回空 204,正常逻辑被短路 - **L241** (`delete_duplication_record` DELETE 端点): 保留不动 — 204 返回正确 ## 影响 修复前,GET /records/{id} 和 POST /records/{id}/retry 两个端点永远返回 HTTP 204 空响应,前端无法获取查重详情或重新提交查重。
xiaoxia added 1 commit 2026-06-28 18:00:21 +08:00
fix: 删除 GET/POST 端点中错误的 204 返回
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
71dd13eebb
- get_duplication_detail (GET): 删除 L209 的 return Response(status_code=204)
- retry_duplication (POST): 删除 L262 的 return Response(status_code=204)
- delete_duplication_record (DELETE): 保留 204 返回(正确)

这两个 Bug 导致 GET 和 POST 端点永远返回空 204,正常逻辑被短路。
xiaoxia merged commit db5f5cff28 into develop 2026-06-28 18:11:00 +08:00
Sign in to join this conversation.