GitHub PullRequestReviewCommentEvent at 2014-03-15 02:23:48
Repository: galaxy
Actor: scottmeng
Payload: {"comment":{"url":"https://api.github.com/repos/cvan/galaxy/pulls/comments/10632985","id":10632985,"diff_hunk":"@@ -1,10 +1,20 @@\n define('views/game',\n-       ['jquery', 'l10n', 'utils', 'z'],\n-       function($, l10n, utils, z) {\n+       ['jquery', 'l10n', 'requests', 'user', 'utils', 'urls', 'z'],\n+       function($, l10n, requests, user, utils, urls, z) {\n+\n+    function updatePlay(gameSlug) {\n+        var newData = {\n+            game: gameSlug\n+        };\n+        requests.post(urls.api.url('user.purchase'), newData);","path":"src/media/js/views/game.js","position":11,"original_position":11,"commit_id":"8fdbf6f7c4f13bec6bbb6cbe1316bab083ff45ee","original_commit_id":"8fdbf6f7c4f13bec6bbb6cbe1316bab083ff45ee","user":{"login":"scottmeng","id":1774203,"avatar_url":"https://gravatar.com/avatar/21be83fc70cf53ba855c6a3d1da604c0?d=https%3A%2F%2Fidenticons.github.com%2Fd959d6a716f9ff3955c92f2f57bdfa3e.png&r=x","gravatar_id":"21be83fc70cf53ba855c6a3d1da604c0","url":"https://api.github.com/users/scottmeng","html_url":"https://github.com/scottmeng","followers_url":"https://api.github.com/users/scottmeng/followers","following_url":"https://api.github.com/users/scottmeng/following{/other_user}","gists_url":"https://api.github.com/users/scottmeng/gists{/gist_id}","starred_url":"https://api.github.com/users/scottmeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottmeng/subscriptions","organizations_url":"https://api.github.com/users/scottmeng/orgs","repos_url":"https://api.github.com/users/scottmeng/repos","events_url":"https://api.github.com/users/scottmeng/events{/privacy}","received_events_url":"https://api.github.com/users/scottmeng/received_events","type":"User","site_admin":false},"body":"I think we have two options here:\r\n- do a check on the back-end, which means we need to have an optional ```_user``` field added to our ```game/detail``` endpoint\r\n- do a check on the front-end, pulling all the games the user has played before whenever the user signs in (which would also require a bit of back-end modification)\r\n\r\nwhat do you say? @cvan @anybody else who are interested in this","created_at":"2014-03-15T02:23:48Z","updated_at":"2014-03-15T02:23:48Z","html_url":"https://github.com/cvan/galaxy/pull/140#discussion_r10632985","pull_request_url":"https://api.github.com/repos/cvan/galaxy/pulls/140","_links":{"self":{"href":"https://api.github.com/repos/cvan/galaxy/pulls/comments/10632985"},"html":{"href":"https://github.com/cvan/galaxy/pull/140#discussion_r10632985"},"pull_request":{"href":"https://api.github.com/repos/cvan/galaxy/pulls/140"}}}}