Skip to content

BE 031 - Fix Admin Pending Guard Document Aggregation - #497

Open
7-hello007 wants to merge 1 commit into
mainfrom
7-hello007/fix/admin-guards-pending-documents
Open

BE 031 - Fix Admin Pending Guard Document Aggregation#497
7-hello007 wants to merge 1 commit into
mainfrom
7-hello007/fix/admin-guards-pending-documents

Conversation

@7-hello007

Copy link
Copy Markdown
Collaborator

Fix: GET /api/v1/admin/guards/pending document handling

Changes

  • Fixed documents[] to use verificationStatus instead of non-existent status
  • Deduplicated equivalent license records (modern document takes precedence)
  • Preserved imageUrl, _id, rejectionReason, reviewedAt, verifiedBy in response

Tests

  • Added 8 regression tests covering pending/verified/rejected documents
  • All existing tests pass

Evidence

  • test pass
屏幕截图 2026-08-13 165225
  • api call showing response
屏幕截图 2026-08-13 165250 屏幕截图 2026-08-13 165311

- Fixed `documents[]` to use `verificationStatus` instead of non-existent `status`
- Deduplicated equivalent license records (modern document takes precedence)
- Preserved `imageUrl`, `_id`, `rejectionReason`, `reviewedAt`, `verifiedBy` in response

- Added 8 regression tests covering pending/verified/rejected documents
- All existing tests pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant