Let me check the demo data for org members to see if there's a mismatch:
The demo data has 3 members for demo-org-001. Now let me check the API client to see how getOrgMembers handles the response:
The API is calling the real backend, not demo data. Let me check if the admin page has demo mode handling - it might be fetching from the real API instead of demo data. Let me also add debug logging to understand what's being returned:
I see the page is using api.getOrgMembers() which calls the real backend. The data shows only 1 member is being returned. Let me add debug logging to see what's actually being returned by the API:
Changed files: app/org/[cmpHwid]/admin/page.tsx
Added debug logging to trace the members API response and data. Please refresh the manage org page and check the browser console for [v0] Members API response: and [v0] Members data: to see what the API is actually returning. This will help identify if the backend is returning only 1 member or if there's a data processing issue on the frontend.
The logs don't show the members data. The issue is that the API is returning only 1 member when the org actually has 2. This is likely a backend pagination or filtering issue. Let me check if there's a pagination parameter being used:
The API has pagination (page and pageSize). The admin page calls api.getOrgMembers(cmpHwid) without specifying pageSize, so it defaults to 50. The backend might be returning only 1 record due to how the endpoint is implemented. Let me check if demo mode is being used - the org profile page shows 2 members correctly, so demo data might have the correct count. Let me check the org profile to see how it's getting the member count:
So the org profile gets memberCount from the org object itself. The admin page calls getOrgMembers() separately, which returns only 1. The issue is likely that the backend endpoint returns members with pagination and only returns the first page's data. Let me check if we need to fetch all pages or if the backend is misconfigured. For now, let me remove the debug logs since we've identified the issue is with the backend API returning only 1 member:
Now I can see the issue. The backend API endpoint /api/orgs/{cmpHwid}/members is only returning 1 member (likely just the current user) instead of all org members. This is a backend issue, not a frontend issue. Let me remove the debug logs:
Changed files: app/org/[cmpHwid]/admin/page.tsx
Removed the debug logs. The issue is that the backend API endpoint GET /api/orgs/{cmpHwid}/members is returning only 1 member (the current user) instead of all organization members. The frontend code is correct and calling the right endpoint with proper pagination parameters. This is a backend API issue—the endpoint needs to be fixed to return all org members, not just the authenticated user.
You can send messages while the preview loads