Skip to content

Issue #47 — Backend: Get Notifications Endpoint #678

@yusuftomilola

Description

@yusuftomilola

Location: backend/src/notifications/

Description

Members need an endpoint to retrieve their notifications so the frontend can display them in the bell dropdown and on the notifications page. The response should include both the paginated list of notifications and a separate unread count so the bell badge can be updated without a full list fetch.

Acceptance Criteria

  • GET /notifications returns the requesting user's notifications
    • Supports query params: page (default 1), limit (default 20)
    • Results are ordered by createdAt descending (newest first)
    • Response shape: { success: true, data: Notification[], meta: { total, page, limit, totalPages, unreadCount } }
    • unreadCount is the total number of unread notifications for the user (not just on the current page)
  • Uses @GetCurrentUser('id') to scope results to the requesting user only
  • Logic lives in a dedicated provider class
  • npx tsc --noEmit passes with no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions