Update fixture file with upvoters and votes
- Add upvoters attribute to each fixture post as an empty array which will contain the upvoters
- Add votes attribute which will keep track of how many upvotes a post has
- Votes attribute starts at 0
Initialize upvoters and votes attributes upon post creation
- Upon post creation, upvoters property will be initialized as an empty array
- Upon post creation, votes will be initialized at a value of 0
Add upvote button to post partial
- Implement upvote arrow button in next to each postItem in postItem template
- Also show how many upvotes a post has via spacebars
Add event listener for upvote click
- When a user clicks on the upvote button, Meteor will call the upvote method
- It will also pass the postId along with the Meteor call
Add server-side Method upvote function
- Upvote funtion takes the postId as an argument which is passed from client-side
- Checks to see if the upvoting user is actually a user, otherwise show login error
- Checks to see if the post exists, otherwise show post not found error
- Checks to see if the voter has already voted
- If all checks pass, then the votes count on the post is incremented by 1
- Also adds the upvoter to the upvoters array property in the postItem
Merge pull request #38 from alexanderdavidpan/Add_Basic_Upvoting_Algorithm

Add basic upvoting algorithm