generated from hack4impact-calpoly/nextjs-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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.tsin../src/app/api/program - Retrieve all Programs (
../api/program) GET - Update/Create second
route.tsin../src/app/api/program/[programId] - Retrieve a single Program (
../api/program/[programId]) GET - Create a new Program (
../api/program) POST
Reactions are currently unavailable
