{"push_id":2461609563,"size":5,"distinct_size":5,"ref":"refs/heads/master","head":"f46f2a5a06661d8944276a9c949e8d4abef5db38","before":"c43f0ce0d5c951355b610d15b7403e812487d34d","commits":[{"sha":"f268f60b4091143a1e3ef4e66351f5e7882af81a","author":{"name":"HarpersGeekly","email":"30d4b806341adf2ab15e9a205ee4045df9d4fbab@gmail.com"},"message":"Moved commentsAJAX div outside of the div that contains the each loop for comments. Strange issue was arising wherein new ajax comments were being appended inside each iteration of the loop, and when edited and saved, the comment text was being looped as well, duplicating the text.","distinct":true,"url":"https://api.github.com/repos/HarpersGeekly/redwood-springboot-blog/commits/f268f60b4091143a1e3ef4e66351f5e7882af81a"},{"sha":"98442f20b1da1448bb6f74cbc7135aabe4aa06d5","author":{"name":"HarpersGeekly","email":"30d4b806341adf2ab15e9a205ee4045df9d4fbab@gmail.com"},"message":"No longer using the PostVotesRepository to check if a user hasVoted.\n\nPostVote:\n-add JsonIgnore to getters\n-added new methods that checks if type isUpvote() or isDownVote() by returning type == 1 or type == -1, respectively.\n-added method that checks if voteBelongsTo(User user) by returning whether this.user's id equals the user's id of the one on the vote.","distinct":true,"url":"https://api.github.com/repos/HarpersGeekly/redwood-springboot-blog/commits/98442f20b1da1448bb6f74cbc7135aabe4aa06d5"},{"sha":"6cdf51c56afa2642caa031f2862e6715e769cab5","author":{"name":"HarpersGeekly","email":"30d4b806341adf2ab15e9a205ee4045df9d4fbab@gmail.com"},"message":"Removing a vote:\nPost model:\n-changed cascadetype to ALL, with an orphanRemoval = true (looks for null and dumps)\n-added method called getVoteFrom(User user) that loops through the List<PostVote> votes collection and checks if vote.voteBelongsTo(user) then return that vote, otherwise return null\n-added void method removeVote(PostVote vote) that uses the collection votes.remove(vote)","distinct":true,"url":"https://api.github.com/repos/HarpersGeekly/redwood-springboot-blog/commits/6cdf51c56afa2642caa031f2862e6715e769cab5"},{"sha":"9efb6fc31a8318f4a301a7600681247849c24fd9","author":{"name":"HarpersGeekly","email":"30d4b806341adf2ab15e9a205ee4045df9d4fbab@gmail.com"},"message":"Removing a vote:\nmain.css,\n-added .stayActive that changes color of icon to bright blue.\nshow.html,\n-when you click on an upvote or downvote icon, javascript adds the stayActive class to appear light blue and if you change votes, it removes and adds the class accordingly.\n-when you click on an upvote or downvote icon again, a click event listener will read stayActive and proceed with removal of the vote by serializing the same form, but going to a new url in the PostsController voteRemoval().","distinct":true,"url":"https://api.github.com/repos/HarpersGeekly/redwood-springboot-blog/commits/9efb6fc31a8318f4a301a7600681247849c24fd9"},{"sha":"f46f2a5a06661d8944276a9c949e8d4abef5db38","author":{"name":"HarpersGeekly","email":"30d4b806341adf2ab15e9a205ee4045df9d4fbab@gmail.com"},"message":"Removing a vote:\n-voteRemoval(): finds post from path variable, finds user from session, grabs the post's collection of votes: List<PostVote> votes = post.getVotes(). Loops through the collection and runs the method vote.voteBelongsTo(user) which checks if owner of the vote matches the loggedin user. If they match, remove that users vote from the collection by running post.removeVote(vote). break; breaks out of the loop. cascadeType.ALL in Post model assists with removal. post is saved.\n\n-showPostsById(): added PostVote vote = post.getVoteFrom(user), added attributes to be used in the view upon arrival to the page. viewModel.addAttribute(\"upvote\", vote != null && vote.isUpvote(). similar for \"downvote\" isDownvote();","distinct":true,"url":"https://api.github.com/repos/HarpersGeekly/redwood-springboot-blog/commits/f46f2a5a06661d8944276a9c949e8d4abef5db38"}]}
{"actor":{"display_login":"HarpersGeekly"}}