The Home LiveView lists the most wanted by number of votes.
Votes are stored in the vote table, which references the wanteds and users.
Each row in the votes table counts as one vote for a wanted, and a unique index ensures each user can only vote once.
(Issue #4 did not mention creating a votes table but I didn't think it was possible to complete without storing votes somehow).
A wanted that is completed is not shown in the Home view.
This PR does not cover creating wanteds (see #7 ) or adding votes.
This PR adds a Home Liveview at the root
/
path.The Home LiveView lists the most wanted by number of votes.
Votes are stored in the
vote
table, which references thewanteds
andusers
.Each row in the votes table counts as one vote for a wanted, and a unique index ensures each user can only vote once. (Issue #4 did not mention creating a votes table but I didn't think it was possible to complete without storing votes somehow).
A wanted that is completed is not shown in the Home view.
This PR does not cover creating wanteds (see #7 ) or adding votes.
Closes #4