pdx-cs-rust-web / knock-knock

class webserver demo spring 2024
Other
2 stars 3 forks source link

Add PUT method for /joke/:id #6

Closed relia1 closed 6 months ago

relia1 commented 6 months ago

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.

BartMassey commented 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.

relia1 commented 6 months ago

Made some updates to the ticket description. I'll probably update it more tomorrow morning.