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
/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.
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
/api/challenges/<id of challenge>
PUT /api/challenges/<id of challenge> to update a challenge
Last updated 2 years ago