Skip to content

Event Schema and Endpoints #14

@carboninl

Description

@carboninl

Description

Create an Event Mongoose schema to support event card data in ../src/database/models, and update/create API endpoints for accessing the event data.

Acceptance Criteria

The Event schema should include the following fields:
name, dayOfWeek, date, startTime, endTime, programId, eventId (in addition to any existing fields).

Create API endpoints for:

  • Retrieving all Events
  • Retrieving a specific Event by id
  • Creating a new Event (POST)

Steps:

  • Update the Event schema file in ../src/database/models
  • Add fields (name, dayOfWeek, date, startTime, endTime, programId, eventId) to the Event schema
  • Create "event" API folder under ../src/app/api (ignore if already created)
  • Update/Create route.ts in ../src/app/api/event
  • Retrieve all Events (../api/event) GET
  • Update/Create second route.ts in ../src/app/api/event/[eventId]
  • Retrieve a single Event (../api/event/[eventId]) GET
  • Create a new Event (../api/event) POST

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions