💻Lab: Implement an API to create challenges

Create the API for adding new challenges

Add a new API endpoint which stores a new challenge in the database.

  • It should be a POST request and the URL should be /api/challenges

  • Test it using Postman

Send the POST requests using Postman but make sure you can also see the new challenges in your challenge list page.

Already done?

You can get a headstart on the next part by also adding these API endpoints and testing them using Postman:

  • DELETE /api/challenges/<id of challenge> to delete a challenge

  • PUT /api/challenges/<id of challenge> to update a challenge

Last updated