You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Title: Bug in Upvote/Downvote System Allowing Negative and Infinite Counts
Describe the bug
The current upvote/downvote system for tutorials and comments allows negative and infinite counts, which leads to inaccurate and inconsistent data representation.
To Reproduce
Steps to reproduce the behavior:
Go to any tutorial or comment.
Click on the downvote button multiple times.
Observe that the count can go negative.
Click on the upvote button repeatedly without limit.
Observe that the count can become excessively large (potentially infinite).
Expected behavior
The upvote/downvote system should be replaced with a like/dislike feature that ensures counts are finite and non-negative. Specifically:
Users should only be able to like or dislike an item once.
The count should accurately reflect the total number of likes and dislikes, without going below zero or exceeding realistic limits.
Desktop :
OS: macOS
Browser: Chrome
Version: 125.0.6422.141 (Official Build) (arm64)
Additional context
This issue highlights the need for a new like/dislike feature to replace the existing upvote/downvote system. The new implementation should:
Ensure the database interactions for user likes and dislikes align with the existing database design.
Implement these interactions for both tutorials and comments.
Include validation to prevent negative and infinite counts.
Provide a clear migration path from the current system to the new feature to maintain data integrity.
The text was updated successfully, but these errors were encountered:
Title: Bug in Upvote/Downvote System Allowing Negative and Infinite Counts
Describe the bug
The current upvote/downvote system for tutorials and comments allows negative and infinite counts, which leads to inaccurate and inconsistent data representation.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The upvote/downvote system should be replaced with a like/dislike feature that ensures counts are finite and non-negative. Specifically:
Desktop :
Additional context
This issue highlights the need for a new like/dislike feature to replace the existing upvote/downvote system. The new implementation should:
The text was updated successfully, but these errors were encountered: