Open FreemanBoss opened 3 months ago
Fetch a single testimonial by Id.
GET /api/v1/testimonials/:testimonial_id
404
401
200
Authorization: Bearer: <token>
Be able to view a single testimonial and leave a comment.
GET /api/v1/testimonials/: testimonial_id
{ "message": "Testimonial fetched successfully", "status_code": 200, "data": { "id": "String", "author": "String", "testimonial": "String", "comments": Array, "created_at": "DateTime", } }
{ "status_code": 404, "message": "Testimonial not found" }
{ "status_code": 401, "message": "Unauthorized " }
User should be able to view Single Testimonial and all the comments associated with it.
Reference ticket: hngprojects/hng_boilerplate_nestjs#255 Slack id: - Habeeb Babasulaiman
Description
Fetch a single testimonial by Id.
Acceptance Criteria
GET /api/v1/testimonials/:testimonial_id
404
status code if the testimonial does not exist.401
status code if the user is not authenticated.200
status code if the testimonial is fetched.Authorization: Bearer: <token>
Purpose
Be able to view a single testimonial and leave a comment.
Requirements
Authorization: Bearer: <token>
API Endpoint
Response
Error Responses
Expected Outcome
User should be able to view Single Testimonial and all the comments associated with it.
Tasks
Testing