The NewUserPostVote API is defined like this in python proxy:
req = requests.post(f"{API_BASE_URL}/users/{id}/posts/{pid}/votes?access_token={access_token}", json={"vote":vote})
The vote have this typo in typescript:
export type newVote = -1 | 0 | 1
The problem is that seems that with the current Nerdz Api (e.g. the /me/home endpoint) we can't directly know if the current user have set or not set a vote in a specific post. This erase the problem of how to know if a user have already voted or not a post
Possibile solutions
- Edit the /me/home and /users/posts response and integrate if the user have voted or not the current post
The NewUserPostVote API is defined like this in python proxy:
req = requests.post(f"{API_BASE_URL}/users/{id}/posts/{pid}/votes?access_token={access_token}", json={"vote":vote})The vote have this typo in typescript:
export type newVote = -1 | 0 | 1The problem is that seems that with the current Nerdz Api (e.g. the /me/home endpoint) we can't directly know if the current user have set or not set a vote in a specific post. This erase the problem of how to know if a user have already voted or not a post
Possibile solutions