You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
PUT /shows/{id}
endpoint.Additional Information:
PUT /shows/{id}
endpoint.Acceptance Criteria:
PUT /shows/{id}
endpoint successfully updates the show record in the database.HTTP 200
status code upon successful update.The text was updated successfully, but these errors were encountered: