Skip to content

Instantly share code, notes, and snippets.

@edoves
Created November 14, 2023 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edoves/a5cbc324f2732934d80e0bf3e85835df to your computer and use it in GitHub Desktop.
Save edoves/a5cbc324f2732934d80e0bf3e85835df to your computer and use it in GitHub Desktop.
// Update or edit
app.post('api/course/:id', (req,res) => {
// check the course if it exist
// if not existing, return a 404 status.
//validate
// if invalid, return 404 -bad request
//update course
// return the updated course
})
// delete
app.delete('api/course/:id', (req,res) => {
//check the course if it exist
// if not existing, return a 404 status.
//delete
//return the same course
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment