Erudika / scoold

A Stack Overflow clone for teams (self-hosted or hosted)
https://scoold.com
Apache License 2.0
862 stars 239 forks source link

voteup votedown not working properly #384

Closed Saurabh48 closed 1 year ago

Saurabh48 commented 1 year ago

if one person do voteup or votedown then after few seconds another person can't do voteup or votedown

albogdano commented 1 year ago

Are talking about the Scoold API? Please, provide more details to reproduce the issue.

Saurabh48 commented 1 year ago

yes i am using scoold api to voteup and votedown

albogdano commented 1 year ago

Not sure what you thought was the problem here. Have you read how the voting system works? https://github.com/Erudika/scoold#voting

A user can only vote once per post every 30 days by default. Within 30s of the first vote you can amend it then it's locked. All other users can vote at the same time on the same post but no more than once.

The correct way to call the API is this:

PUT http://localhost:8000/api/posts/{post_id}/voteup?userid={user_id}
Saurabh48 commented 1 year ago

yeah but in my case if user1 will do a vote then no other user can do vote. the question is locked for voting. no one can vote now.

albogdano commented 1 year ago

I am not able to reproduce this issue. Are you sure there are no error messages in Para or Scoold logs? The normal behavior is that the post becomes locked only for the person who voted not everyone.

Saurabh48 commented 1 year ago

i am using scoold locally in my machine through docker. can you tell me where to find scoold and para logs for this issue?

Saurabh48 commented 1 year ago

yeah i got it. the issue is solved now. Thanks for the help