[ ] Develop server-side logic to handle testimonial deletion requests.
[ ] Validate incoming testimonial ID data.
[ ] Validate the user deleting the testimonial is an admin.
Testing
[ ] Write unit tests for the delete testimonial logic.
[ ] Test various scenarios such as deleting existing testimonials, attempt without authentication or proper permissions, deleting
fictitious testimonial.
Description
Develop an api endpoint to handle the deletion of a testimonial. This api will validate the testimonial_id
Acceptance Criteria
api/v1/testimonials/:testimonial_id
Bearer <token>
Purpose
Delivers a api that manages testimonial deletion and verifies the validity of the testimonial ID.
Requirements
Data Validation: The api should validate the request to ensure that the testimonial id is present and valid
Expected Outcome
Successful deletion of testimonial with selected testimonial id.
Endpoint:
HTTP [DELETE] /api/v1/testimonials/:testimonial_id
API Request Example:
DELETE /api/v1/testimonials/:testimonial_id
API Successful Response
API Error Response
Bad request
Unauthorized
Not Found
Server Error
Tasks
Testing