Currently when a user likes a post, that like record gets added to my Likes table with the userId and the postId.
Now, when a user is looking at a post, I want to determi
You don't need to request Like
once again, you got all post's likes at your hand:
for (const post of plainPosts) {
// check if we have any like among posts' likes that is made by a certain user
const isLiked = post.Likes.some(x => x.userId === req.user.id);
const { Post_Images, ...postAttributes } = post;
...