When a user submits a vote/like for a post a request is sent to the /api/v3/post/like route with an example payload such as
{
"post_id": 32,
"score": 1
}
This works well when up- or downvoting a post. Ie. sending in a score value of 1 or -1. But when sending in a score value of 0, the API always responds with a 401 Unauthorized error.
Reproduce
Login as a non-admin user
Find or create a post
If in frontend UI, click the upvote button twice (can use Postman or similar program for this)
The first click, the vote score of 1 goes through fine
The second click, the vote score of 0 causes 401 error
When a user submits a vote/like for a post a request is sent to the
/api/v3/post/like
route with an example payload such asThis works well when up- or downvoting a post. Ie. sending in a score value of 1 or -1. But when sending in a score value of 0, the API always responds with a 401 Unauthorized error.
Reproduce