Skip to content

EVENT-12 - Expose CMS API Endpoint #40

@oorjagandhi

Description

@oorjagandhi

Description

Expose and configure the API endpoint for the Events collection in Payload CMS so the frontend can fetch events. The endpoint needs to return all fields required by the frontend, and the isUpcoming boolean must be present so the frontend can correctly split events into the upcoming card and the past events grid.

Search and category filtering are handled client-side, so no query parameter support is needed for those.

Acceptance Criteria

  • A GET endpoint exists for events (e.g. /api/events)
  • The endpoint returns all events with the following fields: title, date, description, coverImage, isUpcoming, category, images, and a slug / id for linking to the gallery
  • Response shape is documented and shared with the frontend team before #X
  • Field names match the confirmed CMS schema: title, date, description, coverImage, isUpcoming, images

Additional Notes

  • Filtering and search are client-side, no query parameter support needed for those
  • Past vs upcoming is determined by the isUpcoming boolean, not by comparing dates
  • Gallery is an array of images on the Event collection itself — no separate Gallery collection needed

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions