Skip to content

Create Instrument & Instrument Change API Endpoints #24

@alexy-ok

Description

@alexy-ok

Quote

“Words are blunt instruments, Words are sawn-off shotguns.” - Thom Yorke, Jigsaw Falling Into Place

Description

  • Your task is to create backend CRUD routes that will allow us to interact with our database
  • CRUD stands for Create, Read, Update, Delete. Each maps to a different function for a RESTful (invented at UCI 🐜) API in Express.js: post, get, put, delete

Instructions

  • Create a Express.js file with routes for interacting with the instrument table
  • Create a Express.js file with routes for interacting with the instrument_change table

Notes

  • Use the server/routes/sample.ts as reference for new routes

Acceptance Criteria

  • server/routes/instrument.js contains CRUD routes for the instrument table
    • Route for creating an instrument
    • Route for reading all instruments
    • Route for reading an instrument
    • Route for updating an instrument
    • Route for deleting an instrument
  • server/routes/instrumentChange.js contains CRUD routes for the instrument_change table
    • Route for creating an instrument change
    • Route for reading all instrument changes
    • Route for reading an instrument change
    • Route for updating an instrument change
    • Route for deleting an instrument change
  • Add routes to server/src/app.ts
    • instrumentRouter for /instruments
    • instrumentChangeRouter for /instrument-changes
  • Backend routes work, able to test using Postman/curl (Include pictures if possible)
    • Be careful because routes will actually affect the database !!

Resources

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions