{"action":"opened","issue":{"url":"https://api.github.com/repos/LLK/scratch-www/issues/2263","repository_url":"https://api.github.com/repos/LLK/scratch-www","labels_url":"https://api.github.com/repos/LLK/scratch-www/issues/2263/labels{/name}","comments_url":"https://api.github.com/repos/LLK/scratch-www/issues/2263/comments","events_url":"https://api.github.com/repos/LLK/scratch-www/issues/2263/events","html_url":"https://github.com/LLK/scratch-www/issues/2263","id":375436507,"node_id":"MDU6SXNzdWUzNzU0MzY1MDc=","number":2263,"title":"Ensure 0 is the minimum number of favorites or loves on a project","user":{"login":"rschamp","id":1512021,"node_id":"MDQ6VXNlcjE1MTIwMjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1512021?v=4","gravatar_id":"","url":"https://api.github.com/users/rschamp","html_url":"https://github.com/rschamp","followers_url":"https://api.github.com/users/rschamp/followers","following_url":"https://api.github.com/users/rschamp/following{/other_user}","gists_url":"https://api.github.com/users/rschamp/gists{/gist_id}","starred_url":"https://api.github.com/users/rschamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rschamp/subscriptions","organizations_url":"https://api.github.com/users/rschamp/orgs","repos_url":"https://api.github.com/users/rschamp/repos","events_url":"https://api.github.com/users/rschamp/events{/privacy}","received_events_url":"https://api.github.com/users/rschamp/received_events","type":"User","site_admin":false},"labels":[{"id":675046585,"node_id":"MDU6TGFiZWw2NzUwNDY1ODU=","url":"https://api.github.com/repos/LLK/scratch-www/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-30T11:15:33Z","updated_at":"2018-10-30T11:15:33Z","closed_at":null,"author_association":"MEMBER","body":"> After I shared my project… after rapidly mashing the favorites and loves buttons, I got both numbers to go into the negatives (as far as “-5”) @kathymakes \r\n\r\nNo matter how much you mash the love and favorite buttons, you should never be able to reach -1 (or fewer!) loves or favorites. We should ensure this at the client level (e.g.  `{Math.max(props.favoriteCount, 0)}` to output the count), and at the server level, both by never decrementing below 0, and by returning the new count after each love/fave, which the client should then use to update its own count."}}
{"actor":{"display_login":"rschamp"}}