-
Notifications
You must be signed in to change notification settings - Fork 0
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
Customer Review (+ Pagination) #4
Comments
Backend updates:
Now, all get requests to the Sample GET request: Sample GET request: |
To create a product, now The backend will respond with a response that is a JSON object: {
"totalComments": 4,
"product": {
"sku": "797-94-5844",
"_id": "5e18a1e67b1ca583dc3a5796",
"name": "Addy Alldre",
"price": 1999.23,
"description": "Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis. Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor.",
"mediaUrl": "https://res-3.cloudinary.com/dwpujv6in/image/upload/c_pad,dpr_2.0,f_auto,h_930,q_auto,w_930/v1/media/catalog/product/c/l/cl1_secktc_cl_view1-cleon-small-sectional-tait-charcoal.jpg",
"comments": [
{
"_id": "5e30e70ff872f6e0cb7baf49",
"user": {
"role": "user",
"_id": "5e2f8141aa5fe7ffa77cd9ad",
"name": "asd",
"email": "asd@students.asd.ngo",
"createdAt": "2020-01-28T00:33:05.399Z",
"updatedAt": "2020-01-28T00:33:05.399Z",
"__v": 0
},
"header": "Sixth comment",
"content": "This is a comment content",
"updated_at": "2020-01-29T01:59:43.052Z"
},
{
"_id": "5e30e70af872f6e0cb7baf48",
"user": {
"role": "user",
"_id": "5e2f8141aa5fe7ffa77cd9ad",
"name": "asd",
"email": "a@students.asd.ngo",
"createdAt": "2020-01-28T00:33:05.399Z",
"updatedAt": "2020-01-28T00:33:05.399Z",
"__v": 0
},
"header": "Fifth comment",
"content": "This is a comment content",
"updated_at": "2020-01-29T01:59:38.710Z"
},
{
"_id": "5e30e706f872f6e0cb7baf47",
"user": {
"role": "user",
"_id": "5e2f8141aa5fe7ffa77cd9ad",
"name": "asdas",
"email": "asdasd@students.asdasd.ngo",
"createdAt": "2020-01-28T00:33:05.399Z",
"updatedAt": "2020-01-28T00:33:05.399Z",
"__v": 0
},
"header": "Fourth comment",
"content": "This is a comment content",
"updated_at": "2020-01-29T01:59:34.320Z"
},
{
"_id": "5e30e6fff872f6e0cb7baf46",
"user": {
"role": "user",
"_id": "5e2f8141aa5fe7ffa77cd9ad",
"name": "asdasd",
"email": "asd@students.asdasd.ngo",
"createdAt": "2020-01-28T00:33:05.399Z",
"updatedAt": "2020-01-28T00:33:05.399Z",
"__v": 0
},
"header": "Third comment",
"content": "This is a comment content",
"updated_at": "2020-01-29T01:59:27.070Z"
}
]
}
} |
the header is removed from the comment. |
User story
Template: As a < type of user >, I want < some goal > so that < some reason >.
Example user story: As a user, I want to add a comment on a product and list all the previous comments so that I can share my experience and learn what other users experienced with that product.
Plan for technical implementation
Frontend
a. A content input
b. A submit button
a. A header area for the user name and subheader for the time
b. A content area for the content of the comment
Backend
a. Add comments array that will have objects which include:
a. Update GET API that also sends total comments and accepts page number as a query parameter
b. Add a PUT API endpoint to handle new comment submits
The text was updated successfully, but these errors were encountered: