liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Use absinthe query to find a vote by user email & proposal url #87

Open davefrey opened 3 years ago

davefrey commented 3 years ago

In api_client.rb there is a private method user_voted?(participant_email, proposal_url) that currently retrieves all LV votes and then filters locally on mail and url.

Instead we need a parameterized query to just return the vote(s) of interest. Once this is repaired, we can probably pull up the private into the public method used to expose the call. The api-side of this problem is in issue https://github.com/liquidvotingio/api/issues/230.

This same exact problem for finding a delegate is in issue #21 (api_client.rb) and https://github.com/liquidvotingio/api/issues/163 (api side).