As discussed, the proposals service was setup before auth, so the .index() query is currently returning the user vote of the same proposal.
Expected Results
The proposals.index() should return the logged in user's vote. For example, if logged in as test_user@test.com, the proposals list should include the test user's vote for each proposal with a vote, else it will not be included.
Acceptance criteria
[x] Update service with query to return user votes
[x] Accompanying tests to verify query returns expected results
[x] Test that logged in user vote is returned and not other users
[x] Test that userVote is not returned if the user has not voted, or there isn't a logged in user
As discussed, the
proposals
service was setup before auth, so the.index()
query is currently returning the user vote of the same proposal.Expected Results
The
proposals.index()
should return the logged in user's vote. For example, if logged in astest_user@test.com
, the proposals list should include the test user's vote for each proposal with a vote, else it will not be included.Acceptance criteria
userVote
is not returned if the user has not voted, or there isn't a logged in user