💻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 challengePUT
/api/challenges/<id of challenge>
to update a challenge
PreviousDay 1: Build out Create, Update and Delete capabilitiesNextLab: Add delete and edit capabilities
Last updated
Was this helpful?