The comment votes endpoint currently only allows you to retrieve comment
votes for a specific user ID. This initial implementation was
restrictive because that was all that politeiagui needs. Opening up the
endpoint to allow a client to retrieve all comment votes made on a
proposal, without needing to provide a user ID, has been requested in
order to help analyze the proposal process. Comment votes are already
public, so there is no reason to not allow this.
Implementation:
Make the user ID field optional.
Return paginated comment votes.
Add A page number field to the command payload, which defaults to 1 if
not provided.
Add new votesPageSize comments plugin setting to use it in both of
politeiawww & politeiad
Add the new votesPageSize plugin setting to the comments' policy reply.
Update comments plugin command in politeiad to reflect the new
implementation.
Update pictl commentvotes command to reflect new changes.
Background:
The comment votes endpoint currently only allows you to retrieve comment votes for a specific user ID. This initial implementation was restrictive because that was all that politeiagui needs. Opening up the endpoint to allow a client to retrieve all comment votes made on a proposal, without needing to provide a user ID, has been requested in order to help analyze the proposal process. Comment votes are already public, so there is no reason to not allow this.
Implementation:
votesPageSize
comments plugin setting to use it in both ofpoliteiawww
&politeiad
votesPageSize
plugin setting to the comments' policy reply.pictl commentvotes
command to reflect new changes.Closes #1591.