-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
feat: add to cart api added #938
Conversation
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.
Hello, @PatilHarshh, thank you for opening a pull request.
Soon the maintainers/owner will review it and provide you with feedback/suggestions.
If you think it's something urgent, feel free to reach out to Tamal on Twitter.
Give us a β to show some support
Happy OpenSource π
@tamalCodes review it |
*Total -- 554.68kb -> 429.64kb (22.54%) /src/assets/pictures/authpages/Auth_banner.png -- 199.40kb -> 78.36kb (60.7%) /src/assets/pictures/authpages/google.png -- 7.87kb -> 4.75kb (39.68%) /src/assets/pictures/shop/handmades/handmades/h4.png -- 109.57kb -> 109.17kb (0.37%) /src/assets/pictures/shop/handmades/h4.png -- 109.57kb -> 109.17kb (0.37%) /src/assets/pictures/shop/trendingproducts/art/artproduct4.png -- 128.27kb -> 128.21kb (0.05%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.0.3 to 16.3.1. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](motdotla/dotenv@v16.0.3...v16.3.1) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tamal Das <tamalcodes@gmail.com>
router.post("/cart/add", async (req, res) => { | ||
try{ | ||
const {email,productId} = req.body; | ||
const response = await User.updateOne({email:email},{$push:{cart:{id:productId}}}) |
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.
Have you defined the User
before ? It says User
not defined.
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.
const User = require("../../schema/user/UserSchema");
on top it is already defined it is working fine (No New Errors)
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.
Also there are instances of Missing semicolon.
please do fix that.
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.
Do you getting Errors ?
β¦#1017) Bumps [react-icons](https://github.com/react-icons/react-icons) from 4.8.0 to 4.10.1. - [Release notes](https://github.com/react-icons/react-icons/releases) - [Commits](react-icons/react-icons@v4.8.0...v4.10.1) --- updated-dependencies: - dependency-name: react-icons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tamal Das <tamalcodes@gmail.com>
@tamalCodes please reply fast so that i can able to work today ASAP |
This pull request has been deployed to Vercel.
|
@tamalCodes see! |
Thankyou Sir It is Great Experience With You @tamalCodes |
* feat: add to cart api added (#938) * API ADDED * API ADDED * API ADDED * [ImgBot] Optimize images (#1012) *Total -- 554.68kb -> 429.64kb (22.54%) /src/assets/pictures/authpages/Auth_banner.png -- 199.40kb -> 78.36kb (60.7%) /src/assets/pictures/authpages/google.png -- 7.87kb -> 4.75kb (39.68%) /src/assets/pictures/shop/handmades/handmades/h4.png -- 109.57kb -> 109.17kb (0.37%) /src/assets/pictures/shop/handmades/h4.png -- 109.57kb -> 109.17kb (0.37%) /src/assets/pictures/shop/trendingproducts/art/artproduct4.png -- 128.27kb -> 128.21kb (0.05%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> * feat: added org invites * fix: changing labels * chore(workflows): re-vamped the existing workflows * chore(deps): bump dotenv from 16.0.3 to 16.3.1 (#1015) Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.0.3 to 16.3.1. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](motdotla/dotenv@v16.0.3...v16.3.1) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tamal Das <tamalcodes@gmail.com> * fix: updating labels * feat: re-added templates * chore(deps): bump react-icons from 4.8.0 to 4.10.1 (#1017) Bumps [react-icons](https://github.com/react-icons/react-icons) from 4.8.0 to 4.10.1. - [Release notes](https://github.com/react-icons/react-icons/releases) - [Commits](react-icons/react-icons@v4.8.0...v4.10.1) --- updated-dependencies: - dependency-name: react-icons dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tamal Das <tamalcodes@gmail.com> --------- Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com> Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> Co-authored-by: Tamal Das <tamalcodes@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: changes to workflow names for DX * docs: updated docs for better understanding * fix: remove extra gaps * feat: new banner for readme * fix: removing extra images * docs: update readme changes * fix: change branch for releases * docs: changes to workflow description * chore(refactor): changes to dockerfiles and issue automations (#1033) * fix: removed extra invitation issue template --------- Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Harsh Patil <harshpatil2956@gmail.com> Co-authored-by: imgbot[bot] <31301654+imgbot[bot]@users.noreply.github.com> Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Related Issue
Closes: #708
Changes made π·π»ββοΈ
Add to cart api is added when user add the product it will add by unique ID
Screenshots πΈ