Closed relia1 closed 6 months ago
Please describe the function of the PUT method: I assume this is for joke update?
PR is indeed welcome. Warning: SW is a moving target right now; it may take several iterations.
Made some updates to the ticket description. I'll probably update it more tomorrow morning.
Title: Add PUT method to /joke/:id for updating jokes
Description:
Currently, our API allows for creating, retrieving, and deleting jokes, but not updating them. Adding the PUT functionality to the /joke/:id endpoint will updating existing jokes.
Requirements
Additional things to consider
With a PUT if the resource doesn't exist it should create it. This can possibly be handled by checking if a joke with the provided ID exists, and if it doesn't discard that ID and just create a new joke with the provided information.