Skip to content

Program Schema and Endpoints #13

@jasonyu0705

Description

@jasonyu0705

Description
Create a Program Mongoose schema to support program card data (like the UI shown) in ../src/database/models, and update/create API endpoints for accessing the program data.

Acceptance Criteria
The Program schema should include the following fields: imageURI, location, date, duration, programName, programId (in addition to any existing fields). Create API endpoints for:

  • Retrieving all Programs
  • Retrieving a specific Program by id
  • Creating a new Program (POST)

Steps:

  • Update the Program schema file in ../src/database/models
  • Add fields (imageURI, location, date, duration, programName, programId) to the Program schema
  • create "program" API folder under ../src/app/api (ignore if already created)
  • Update/Create route.ts in ../src/app/api/program
  • Retrieve all Programs (../api/program) GET
  • Update/Create second route.ts in ../src/app/api/program/[programId]
  • Retrieve a single Program (../api/program/[programId]) GET
  • Create a new Program (../api/program) POST

image reference
Image

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions