Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PUT /shows/{id} Endpoint for Updating an Existing Show by ID #5

Open
7 tasks
Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Open
7 tasks

Implement PUT /shows/{id} Endpoint for Updating an Existing Show by ID #5

Lapotor opened this issue Nov 1, 2023 · 0 comments · May be fixed by #103
Assignees
Milestone

Comments

@Lapotor
Copy link
Collaborator

Lapotor commented Nov 1, 2023

Description:

This work item involves the implementation of the PUT /shows/{id} API endpoint, which allows for the update of an existing show based on its unique ID. The endpoint will accept a JSON payload containing the updated details of the show and apply the changes to the corresponding record in the database.

Tasks:

  • Define the route and controller method for the PUT /shows/{id} endpoint.
  • Validate the input data to ensure it adheres to the expected format and constraints.
  • Retrieve the existing show record from the database using the provided ID.
  • Apply the updates from the JSON payload to the show record.
  • Save the updated record back to the database.
  • Handle any potential errors or edge cases, such as invalid input or database failures.
  • Return an appropriate HTTP response, indicating the success or failure of the operation.

Additional Information:

  • Ensure that the endpoint is protected with appropriate authentication (Bearer token).
  • Consider adding authorization checks to verify that the user has the necessary permissions to update shows.
  • Write unit tests to validate the functionality of the PUT /shows/{id} endpoint.

Acceptance Criteria:

  • The PUT /shows/{id} endpoint successfully updates the show record in the database.
  • The endpoint returns an HTTP 200 status code upon successful update.
  • In case of errors or invalid input, the endpoint provides an appropriate error response.
@Lapotor Lapotor added this to the v1.0.0 milestone Nov 1, 2023
@Lapotor Lapotor linked a pull request Dec 29, 2023 that will close this issue
@Lapotor Lapotor self-assigned this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant