We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Develop an api endpoint to handle the deletion of a testimonial. This api will validate the testimonial_id
Only authenticated users with admin permisssions can delete testimonials.
The endpoint should be accessible at api/v1/testimonials/:testimonial_id
api/v1/testimonials/:testimonial_id
The endpoint should accept HTTP DELETE requests.
The endpoint should be protected and require authentication
Request to the endpoint should include a valid authentication token in Authorization header . Authorization: Bearer <token>
Bearer <token>
Return appropriate response and status code
Delivers a api that manages testimonial deletion and verifies the validity of the testimonial ID.
Data Validation: The api should validate the request to ensure that the testimonial id is present and valid
Successful deletion of testimonial with selected testimonial id.
HTTP [DELETE] /api/v1/testimonials/:testimonial_id
/api/v1/testimonials/:testimonial_id
DELETE /api/v1/testimonials/:testimonial_id
{ "Content-Type": "application/json", "Authorization": "Bearer <token>" }
{ "success": true, "message": "string", "status_code": 200 }
{ "message": "string", "error": "string", "status_code": 400 }
{ "message": "string", "error": "string", "status_code": 401 }
{ "message": "string", "error": "string", "status_code": 404 }
{ "message": "string", "error": "string", "status_code": 500 }
Develop server-side logic to handle testimonial deletion requests.
Validate incoming testimonial ID data.
Validate the user deleting the testimonial is an admin.
Write unit tests for the delete testimonial logic.
Test various scenarios such as deleting existing testimonials, attempt without authentication or proper permissions, deleting
The text was updated successfully, but these errors were encountered:
slack ID: @kibe
Sorry, something went wrong.
Laban254
No branches or pull requests
Description
Develop an api endpoint to handle the deletion of a testimonial. This api will validate the testimonial_id
Acceptance Criteria
Only authenticated users with admin permisssions can delete testimonials.
The endpoint should be accessible at
api/v1/testimonials/:testimonial_id
The endpoint should accept HTTP DELETE requests.
The endpoint should be protected and require authentication
Request to the endpoint should include a valid authentication token in Authorization header . Authorization:
Bearer <token>
Return appropriate response and status code
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
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
The text was updated successfully, but these errors were encountered: