-
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
ft(buyer-cart): should allow a buyer to update their cart [#187364875] #45
ft(buyer-cart): should allow a buyer to update their cart [#187364875] #45
Conversation
8530aaa
to
ad7e629
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
f143293
to
a8a7335
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work @Aldot-02 Work on the reviews below and you're good to go
src/controllers/cart.controller.ts
Outdated
}); | ||
} | ||
); | ||
console.log(cart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.log(cart); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look into this below @Aldot-02
73d1872
dc9461a
to
73d1872
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion @Aldot-02
src/validations/cart.validation.ts
Outdated
@@ -1,17 +1,34 @@ | |||
import Joi from "joi"; | |||
import Joi from 'joi'; | |||
import { Request, Response, NextFunction } from 'express'; | |||
|
|||
export const validateSchema = (schema: Joi.ObjectSchema) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. One more thing. I just saw that you guys are repeating yourselves with this function. Suggestion, remove it from here and put it in like utils or helpers folder.... then we shall import it and reuse it in routes.
The updated cart should be stored in the buyer's session The product details (name, price, image) should be retrieved from the database for each item in the updated cart The new cart total should be calculated by summing the prices of the items in the updated cart An updated cart confirmation message should be sent to the frontend to be displayed to the buyer [Deliver #187364875]
73d1872
to
75f5f20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ℹ️ Description
Fixes #(issue)
🧪 How can this be tested?
This should be tested on the swagger UI using cart endpoints
📍 Type of change
Please check the options that are relevant.
✅ Checklist: