-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Location:
backend/src/users/providers/get-members.provider.tsbackend/src/users/members.controller.ts
Description
Admins need a paginated, searchable, filterable list of all registered members on the platform. This endpoint is the backbone of the admin members management page and must support searching by name or email, filtering by role, and filtering by membership status — all combinable in a single request.
This endpoint is admin-only and must never return sensitive fields such as passwords, TOTP secrets, or backup codes. Use TypeORM's select option or the existing @Exclude() decorators on the entity to ensure sensitive fields are stripped from the response.
Acceptance Criteria
- A
GetMembersProviderclass is created atbackend/src/users/providers/get-members.provider.ts -
GET /membersreturns a paginated list of users- Accepts
MemberQueryDtoquery params:page,limit,search,role,status searchperforms a case-insensitiveILIKEmatch againstfirstname,lastname, andemailusing anORconditionroleandstatusfilters are applied when provided- Results are ordered by
createdAtdescending (newest members first) - Response shape:
{ success: true, data: User[], meta: { total, page, limit, totalPages } }
- Accepts
- The endpoint is guarded with
@UseGuards(RolesGuard)and@Roles(UserRole.ADMIN, UserRole.SUPER_ADMIN, UserRole.STAFF) - Sensitive fields (
password,totpSecret,totpBackupCodes) are never included in the response -
GetMembersProvideris registered and exported fromUsersModule -
npx tsc --noEmitpasses with no errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers