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

[Finishes #187354261] buyer wish list for products #51

Merged
merged 1 commit into from
May 10, 2024

Conversation

P-Rwirangira
Copy link
Collaborator

@P-Rwirangira P-Rwirangira commented May 1, 2024

Purpose

The purpose of this pull request is to implement the backend functionality to handle the addition of items to the buyer's wish list. This includes storing the wish list in the buyer's account and sending a confirmation message to the frontend.

Changes Made

-Implementing functionality to handle POST requests for adding an item to the wish list.
-Validating that the buyer is logged in before allowing the addition of items to the wish list with the help of middlewares.
-Adding the item to the buyer's wish list
-Retrieving the product details (name, price, image) from the database.
-Storing the updated wish list in the buyer's account
-Displaying a confirmation message to the buyer

Provide instructions on how to test the changes

-Send a POST request to the appropriate endpoint (/add-to-wishlist/productId)
-Verify that the item is added to the buyer's wishlist
-Check that the product details (name, price, image) are correctly retrieved from the database
-Ensure that the updated wishlist is stored in the buyer's account
-Verify that a confirmation message is displayed

Related Issues

  • No issues

Reference any related issues or pull requests

Checklist

Please review the following checklist and make sure all tasks are complete before submitting:

  • Code follows the project's co
    Please review the following checklist and make sure all tasks are complete before submitting:

  • Code follows the project's coding standards

  • Changes are covered by tests

  • Documentation is updated (if applicable)

  • All tests pass

@P-Rwirangira P-Rwirangira added ready and removed WIP labels May 9, 2024
@P-Rwirangira P-Rwirangira force-pushed the 187354261-product-watchlist branch from 9acff56 to 8f63e98 Compare May 9, 2024 09:21
@hozayves hozayves added bug Something isn't working and removed ready labels May 9, 2024
@P-Rwirangira P-Rwirangira force-pushed the 187354261-product-watchlist branch from 8f63e98 to 1f32280 Compare May 9, 2024 09:47
@P-Rwirangira P-Rwirangira added ready and removed bug Something isn't working labels May 9, 2024
Copy link
Collaborator

@hozayves hozayves left a comment

Choose a reason for hiding this comment

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

Hi Patrick,

Great work on this! I have a few suggestions. Could we consider removing the name, images, and price columns in your wishList migration? Since we can retrieve data through the product ID, these columns might be redundant.

src/controllers/wishlistController.ts Outdated Show resolved Hide resolved
@P-Rwirangira P-Rwirangira force-pushed the 187354261-product-watchlist branch from 1f32280 to 4e07e2f Compare May 10, 2024 11:51
Copy link
Collaborator

@amin-leon amin-leon left a comment

Choose a reason for hiding this comment

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

why haven't you tried association between user(buyer) and wishList??

Feature for enabling product to be created by seller
@P-Rwirangira P-Rwirangira force-pushed the 187354261-product-watchlist branch from 4e07e2f to 6f1e030 Compare May 10, 2024 15:49
@P-Rwirangira P-Rwirangira requested a review from patrickhag May 10, 2024 15:52
@hozayves hozayves requested a review from gracemugwanezak May 10, 2024 15:54
@niyontwali niyontwali merged commit e8b4578 into develop May 10, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants