-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The "LikePost" feature allows a single user to add likes to a single post as much as he pleases, so it requires a more complex structure in order to ensure that a post can only be liked once by a single user.
Suggestion:
- Database: The database requires another table to store
Users'foreign keys andPosts'foreign keys in order to create an N x N relationship between Users and Posts (this makes it possible also to add more fancy features like fetching a list of the users that currently like the post); - Code: Additional logic must be put in place to validate if a given post is already liked by a given user;
- Unlike: Of course the "UnlikePost" feature should have the same approach applied so that a single user isn't able to indefinitely unlike a post.
Disclaimer: it's not flagged as a bug because it was thought to be simple initially but it's a great enhancement suggestion for the future.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request