Skip to content

Create backend admin dashboard endpoints #475

@yusuftomilola

Description

@yusuftomilola

Description:
Add admin-only endpoints to the Dashboard controller: GET /dashboard/admin/stats (system-wide stats + monthly registration trend + newsletter stats) and GET /dashboard/admin/users (paginated user list with search). Both require admin role.

Acceptance Criteria:

  • GET /dashboard/admin/stats — returns user counts, monthly trend, newsletter stats
  • GET /dashboard/admin/users — paginated, searchable user list
  • Both endpoints protected with @Roles(UserRole.ADMIN) and RolesGuard
  • Search supports filtering by name or email
  • Pagination with page and limit query params

File(s): backend/src/dashboard/dashboard.controller.ts, backend/src/dashboard/dashboard.service.ts

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions