Skip to content
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

Merged
merged 14 commits into from
Aug 10, 2023
Merged

Conversation

PatilHarshh
Copy link
Contributor

Related Issue

Closes: #708

Changes made πŸ‘·πŸ»β€β™‚οΈ

Add to cart api is added when user add the product it will add by unique ID

Screenshots πŸ“Έ

api
api2

Copy link

@github-actions github-actions bot left a 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 πŸš€

@PatilHarshh
Copy link
Contributor Author

@tamalCodes review it

@PatilHarshh PatilHarshh changed the title Add To Cart API Added feat: Add To Cart API Added Jul 16, 2023
@github-actions github-actions bot added the deployed This PR has been deployed to Vercel for testing. label Jul 16, 2023
@PatilHarshh PatilHarshh changed the title feat: Add To Cart API Added feat: add to cart api added Jul 16, 2023
@PatilHarshh
Copy link
Contributor Author

@tamalCodes

imgbot bot and others added 7 commits August 9, 2023 10:57
*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}}})
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you getting Errors ?

server/schema/user/UserSchema.js Show resolved Hide resolved
tamalCodes and others added 4 commits August 9, 2023 21:28
…#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>
@PatilHarshh
Copy link
Contributor Author

@tamalCodes please reply fast so that i can able to work today ASAP

@github-actions
Copy link

This pull request has been deployed to Vercel.

Latest commit: e644c8a
βœ… Preview: https://milan-nx508s1an-iamtamal.vercel.app
πŸ” Inspect: https://vercel.com/iamtamal/milan/FAbToQQtpFNeaZXRDXzGh5Ts5Na6

View Workflow Logs

@PatilHarshh
Copy link
Contributor Author

@PatilHarshh
Copy link
Contributor Author

@tamalCodes see!

@tamalCodes tamalCodes added gssoc23 This issue/PR is part of GSSOC'23. level3 GSSOC 23 -> LEVEL 3 labels Aug 10, 2023
@tamalCodes tamalCodes changed the base branch from main to beta August 10, 2023 07:05
@tamalCodes tamalCodes merged commit 0bd02ad into ngoworldcommunity:beta Aug 10, 2023
5 checks passed
@PatilHarshh
Copy link
Contributor Author

Thankyou Sir It is Great Experience With You @tamalCodes

tamalCodes added a commit that referenced this pull request Aug 15, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed This PR has been deployed to Vercel for testing. gssoc23 This issue/PR is part of GSSOC'23. level3 GSSOC 23 -> LEVEL 3
Projects
Status: Merged/Discarded
Development

Successfully merging this pull request may close these issues.

[FEATURE] API for add to cart functionality
2 participants