From 89a20769740996d5d838136b997b1304e4477284 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Wed, 15 Jul 2026 00:51:14 +0530 Subject: [PATCH] fix(verifications): wrap list response in {items: [...]} GET /api/admin/verifications returned a bare JSON array, but every consumer (Verification Management, Approval Management, and the e2e test's own mock) expects {items: [...]}. Array.isArray(payload?.items) was always false against a bare array, so both admin screens have been showing "No verification requests found" regardless of what's actually in the queue. Co-Authored-By: Claude Sonnet 5 --- apps/users/src/handlers/verifications.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/users/src/handlers/verifications.rs b/apps/users/src/handlers/verifications.rs index 61f575f..cbd2ba7 100644 --- a/apps/users/src/handlers/verifications.rs +++ b/apps/users/src/handlers/verifications.rs @@ -103,7 +103,11 @@ async fn list_verifications( ) .await { - Ok(items) => (StatusCode::OK, Json(items)).into_response(), + Ok(items) => ( + StatusCode::OK, + Json(serde_json::json!({ "items": items, "page": page, "limit": limit })), + ) + .into_response(), Err(e) => (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()).into_response(), } }