Replies: 2 comments 1 reply
-
|
Yes, the info should be present in products list when user is logged in. Additionaly, we can either provide it in the response to get product details call, or do it in a separate call (eg. isLiked endpoint). We would also want to get full lists of liked/disliked ingreedients for user profile. So, to summarize, endpoints connected to like feature:
The last two endpoints could be connected together or stay apart (and possibly paged, but we should talk about the need for it). |
Beta Was this translation helpful? Give feedback.
-
|
I have a plan for this endpoint and I would like to hear your opinion. I think we should separate this task into two:
I think we should have tables users_products (we have this table in database), users_liked_ingredients, user_disliked_ingredients (we have table users_allergens, should we use it or change its name?) to store user_id and product_id/ingredient_id when it's liked/disliked by this user. I think with these tables it would be easy to add isLiked field to products list or isLiked endpoint. Which one do you think is better? I think the first solution is better, because when frontend wants to show products list it has to make a call to isLiked endpoint many times so I think we should add isLiked field it when we return products list. I can't wait to hear what you think. Have a good day everyone :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What does @Java-DZGS/frontend need from @Java-DZGS/backend in regards to product/ingreedient liking?
Probably some endpoint to POST likes/dislikes? Do you guys also want such thing:
or do you want to do it some other way?
Beta Was this translation helpful? Give feedback.
All reactions