{"action":"created","comment":{"url":"https://api.github.com/repos/porygonco/porybox/pulls/comments/63692327","id":63692327,"diff_hunk":"@@ -8,7 +8,8 @@\n module.exports = _.mapValues({\n   async index (req, res) {\n     const boxes = await Box.find({owner: req.user.name});\n-    res.view('home/view', {boxes});\n+    const prefs = await UserPreferences.find({user: req.user.name});","path":"api/controllers/HomeController.js","position":5,"original_position":5,"commit_id":"e7101e6a17068dbe45635a59d26e54412f5aa7ab","original_commit_id":"e7101e6a17068dbe45635a59d26e54412f5aa7ab","user":{"login":"not-an-aardvark","id":11638619,"avatar_url":"https://avatars.githubusercontent.com/u/11638619?v=3","gravatar_id":"","url":"https://api.github.com/users/not-an-aardvark","html_url":"https://github.com/not-an-aardvark","followers_url":"https://api.github.com/users/not-an-aardvark/followers","following_url":"https://api.github.com/users/not-an-aardvark/following{/other_user}","gists_url":"https://api.github.com/users/not-an-aardvark/gists{/gist_id}","starred_url":"https://api.github.com/users/not-an-aardvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/not-an-aardvark/subscriptions","organizations_url":"https://api.github.com/users/not-an-aardvark/orgs","repos_url":"https://api.github.com/users/not-an-aardvark/repos","events_url":"https://api.github.com/users/not-an-aardvark/events{/privacy}","received_events_url":"https://api.github.com/users/not-an-aardvark/received_events","type":"User","site_admin":false},"body":"Yeah, on reconsideration I think this might the better way, provided that we don't block the page load while waiting for all the requests to come in. (For example, we can render the page without knowing the user's default upload preferences.)\r\n\r\nI suppose another way to do it would be to have batch endpoints for all the resources one would need for rendering (to keep the number of requests down) and then test those as well to make sure they don't leak info. I feel like that still duplicates a lot of functionality though, and it increases the attack surface.","created_at":"2016-05-18T12:20:32Z","updated_at":"2016-05-18T12:20:32Z","html_url":"https://github.com/porygonco/porybox/pull/126#discussion_r63692327","pull_request_url":"https://api.github.com/repos/porygonco/porybox/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/comments/63692327"},"html":{"href":"https://github.com/porygonco/porybox/pull/126#discussion_r63692327"},"pull_request":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/porygonco/porybox/pulls/126","id":70423874,"html_url":"https://github.com/porygonco/porybox/pull/126","diff_url":"https://github.com/porygonco/porybox/pull/126.diff","patch_url":"https://github.com/porygonco/porybox/pull/126.patch","issue_url":"https://api.github.com/repos/porygonco/porybox/issues/126","number":126,"state":"open","locked":false,"title":"Initial pokemon upload working.","user":{"login":"YaManicKill","id":2162657,"avatar_url":"https://avatars.githubusercontent.com/u/2162657?v=3","gravatar_id":"","url":"https://api.github.com/users/YaManicKill","html_url":"https://github.com/YaManicKill","followers_url":"https://api.github.com/users/YaManicKill/followers","following_url":"https://api.github.com/users/YaManicKill/following{/other_user}","gists_url":"https://api.github.com/users/YaManicKill/gists{/gist_id}","starred_url":"https://api.github.com/users/YaManicKill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaManicKill/subscriptions","organizations_url":"https://api.github.com/users/YaManicKill/orgs","repos_url":"https://api.github.com/users/YaManicKill/repos","events_url":"https://api.github.com/users/YaManicKill/events{/privacy}","received_events_url":"https://api.github.com/users/YaManicKill/received_events","type":"User","site_admin":false},"body":"I should probably add some more tests, and there's a few UI things that need done, but we can probably merge as is just now and I'll do another PR for that, if you are happy.","created_at":"2016-05-17T20:24:07Z","updated_at":"2016-05-18T12:20:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9050bd80ec6bba7a69c874bfaef5589e61a55354","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/porygonco/porybox/pulls/126/commits","review_comments_url":"https://api.github.com/repos/porygonco/porybox/pulls/126/comments","review_comment_url":"https://api.github.com/repos/porygonco/porybox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/porygonco/porybox/issues/126/comments","statuses_url":"https://api.github.com/repos/porygonco/porybox/statuses/e7101e6a17068dbe45635a59d26e54412f5aa7ab","head":{"label":"porygonco:101-upload-pokemon","ref":"101-upload-pokemon","sha":"e7101e6a17068dbe45635a59d26e54412f5aa7ab","user":{"login":"porygonco","id":17102765,"avatar_url":"https://avatars.githubusercontent.com/u/17102765?v=3","gravatar_id":"","url":"https://api.github.com/users/porygonco","html_url":"https://github.com/porygonco","followers_url":"https://api.github.com/users/porygonco/followers","following_url":"https://api.github.com/users/porygonco/following{/other_user}","gists_url":"https://api.github.com/users/porygonco/gists{/gist_id}","starred_url":"https://api.github.com/users/porygonco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porygonco/subscriptions","organizations_url":"https://api.github.com/users/porygonco/orgs","repos_url":"https://api.github.com/users/porygonco/repos","events_url":"https://api.github.com/users/porygonco/events{/privacy}","received_events_url":"https://api.github.com/users/porygonco/received_events","type":"Organization","site_admin":false},"repo":{"id":51261886,"name":"porybox","full_name":"porygonco/porybox","owner":{"login":"porygonco","id":17102765,"avatar_url":"https://avatars.githubusercontent.com/u/17102765?v=3","gravatar_id":"","url":"https://api.github.com/users/porygonco","html_url":"https://github.com/porygonco","followers_url":"https://api.github.com/users/porygonco/followers","following_url":"https://api.github.com/users/porygonco/following{/other_user}","gists_url":"https://api.github.com/users/porygonco/gists{/gist_id}","starred_url":"https://api.github.com/users/porygonco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porygonco/subscriptions","organizations_url":"https://api.github.com/users/porygonco/orgs","repos_url":"https://api.github.com/users/porygonco/repos","events_url":"https://api.github.com/users/porygonco/events{/privacy}","received_events_url":"https://api.github.com/users/porygonco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/porygonco/porybox","description":"Porybox is a platform that allows users to easily display their Pokémon collections in order to make more informed trade decisions.","fork":false,"url":"https://api.github.com/repos/porygonco/porybox","forks_url":"https://api.github.com/repos/porygonco/porybox/forks","keys_url":"https://api.github.com/repos/porygonco/porybox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/porygonco/porybox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/porygonco/porybox/teams","hooks_url":"https://api.github.com/repos/porygonco/porybox/hooks","issue_events_url":"https://api.github.com/repos/porygonco/porybox/issues/events{/number}","events_url":"https://api.github.com/repos/porygonco/porybox/events","assignees_url":"https://api.github.com/repos/porygonco/porybox/assignees{/user}","branches_url":"https://api.github.com/repos/porygonco/porybox/branches{/branch}","tags_url":"https://api.github.com/repos/porygonco/porybox/tags","blobs_url":"https://api.github.com/repos/porygonco/porybox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/porygonco/porybox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/porygonco/porybox/git/refs{/sha}","trees_url":"https://api.github.com/repos/porygonco/porybox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/porygonco/porybox/statuses/{sha}","languages_url":"https://api.github.com/repos/porygonco/porybox/languages","stargazers_url":"https://api.github.com/repos/porygonco/porybox/stargazers","contributors_url":"https://api.github.com/repos/porygonco/porybox/contributors","subscribers_url":"https://api.github.com/repos/porygonco/porybox/subscribers","subscription_url":"https://api.github.com/repos/porygonco/porybox/subscription","commits_url":"https://api.github.com/repos/porygonco/porybox/commits{/sha}","git_commits_url":"https://api.github.com/repos/porygonco/porybox/git/commits{/sha}","comments_url":"https://api.github.com/repos/porygonco/porybox/comments{/number}","issue_comment_url":"https://api.github.com/repos/porygonco/porybox/issues/comments{/number}","contents_url":"https://api.github.com/repos/porygonco/porybox/contents/{+path}","compare_url":"https://api.github.com/repos/porygonco/porybox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/porygonco/porybox/merges","archive_url":"https://api.github.com/repos/porygonco/porybox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/porygonco/porybox/downloads","issues_url":"https://api.github.com/repos/porygonco/porybox/issues{/number}","pulls_url":"https://api.github.com/repos/porygonco/porybox/pulls{/number}","milestones_url":"https://api.github.com/repos/porygonco/porybox/milestones{/number}","notifications_url":"https://api.github.com/repos/porygonco/porybox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/porygonco/porybox/labels{/name}","releases_url":"https://api.github.com/repos/porygonco/porybox/releases{/id}","deployments_url":"https://api.github.com/repos/porygonco/porybox/deployments","created_at":"2016-02-07T19:25:13Z","updated_at":"2016-02-18T17:48:22Z","pushed_at":"2016-05-18T07:21:26Z","git_url":"git://github.com/porygonco/porybox.git","ssh_url":"git@github.com:porygonco/porybox.git","clone_url":"https://github.com/porygonco/porybox.git","svn_url":"https://github.com/porygonco/porybox","homepage":"http://porygon.co","size":301,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":4,"default_branch":"master"}},"base":{"label":"porygonco:master","ref":"master","sha":"2857812d09c05d284c59e9f282bcc4a960898b99","user":{"login":"porygonco","id":17102765,"avatar_url":"https://avatars.githubusercontent.com/u/17102765?v=3","gravatar_id":"","url":"https://api.github.com/users/porygonco","html_url":"https://github.com/porygonco","followers_url":"https://api.github.com/users/porygonco/followers","following_url":"https://api.github.com/users/porygonco/following{/other_user}","gists_url":"https://api.github.com/users/porygonco/gists{/gist_id}","starred_url":"https://api.github.com/users/porygonco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porygonco/subscriptions","organizations_url":"https://api.github.com/users/porygonco/orgs","repos_url":"https://api.github.com/users/porygonco/repos","events_url":"https://api.github.com/users/porygonco/events{/privacy}","received_events_url":"https://api.github.com/users/porygonco/received_events","type":"Organization","site_admin":false},"repo":{"id":51261886,"name":"porybox","full_name":"porygonco/porybox","owner":{"login":"porygonco","id":17102765,"avatar_url":"https://avatars.githubusercontent.com/u/17102765?v=3","gravatar_id":"","url":"https://api.github.com/users/porygonco","html_url":"https://github.com/porygonco","followers_url":"https://api.github.com/users/porygonco/followers","following_url":"https://api.github.com/users/porygonco/following{/other_user}","gists_url":"https://api.github.com/users/porygonco/gists{/gist_id}","starred_url":"https://api.github.com/users/porygonco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/porygonco/subscriptions","organizations_url":"https://api.github.com/users/porygonco/orgs","repos_url":"https://api.github.com/users/porygonco/repos","events_url":"https://api.github.com/users/porygonco/events{/privacy}","received_events_url":"https://api.github.com/users/porygonco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/porygonco/porybox","description":"Porybox is a platform that allows users to easily display their Pokémon collections in order to make more informed trade decisions.","fork":false,"url":"https://api.github.com/repos/porygonco/porybox","forks_url":"https://api.github.com/repos/porygonco/porybox/forks","keys_url":"https://api.github.com/repos/porygonco/porybox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/porygonco/porybox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/porygonco/porybox/teams","hooks_url":"https://api.github.com/repos/porygonco/porybox/hooks","issue_events_url":"https://api.github.com/repos/porygonco/porybox/issues/events{/number}","events_url":"https://api.github.com/repos/porygonco/porybox/events","assignees_url":"https://api.github.com/repos/porygonco/porybox/assignees{/user}","branches_url":"https://api.github.com/repos/porygonco/porybox/branches{/branch}","tags_url":"https://api.github.com/repos/porygonco/porybox/tags","blobs_url":"https://api.github.com/repos/porygonco/porybox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/porygonco/porybox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/porygonco/porybox/git/refs{/sha}","trees_url":"https://api.github.com/repos/porygonco/porybox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/porygonco/porybox/statuses/{sha}","languages_url":"https://api.github.com/repos/porygonco/porybox/languages","stargazers_url":"https://api.github.com/repos/porygonco/porybox/stargazers","contributors_url":"https://api.github.com/repos/porygonco/porybox/contributors","subscribers_url":"https://api.github.com/repos/porygonco/porybox/subscribers","subscription_url":"https://api.github.com/repos/porygonco/porybox/subscription","commits_url":"https://api.github.com/repos/porygonco/porybox/commits{/sha}","git_commits_url":"https://api.github.com/repos/porygonco/porybox/git/commits{/sha}","comments_url":"https://api.github.com/repos/porygonco/porybox/comments{/number}","issue_comment_url":"https://api.github.com/repos/porygonco/porybox/issues/comments{/number}","contents_url":"https://api.github.com/repos/porygonco/porybox/contents/{+path}","compare_url":"https://api.github.com/repos/porygonco/porybox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/porygonco/porybox/merges","archive_url":"https://api.github.com/repos/porygonco/porybox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/porygonco/porybox/downloads","issues_url":"https://api.github.com/repos/porygonco/porybox/issues{/number}","pulls_url":"https://api.github.com/repos/porygonco/porybox/pulls{/number}","milestones_url":"https://api.github.com/repos/porygonco/porybox/milestones{/number}","notifications_url":"https://api.github.com/repos/porygonco/porybox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/porygonco/porybox/labels{/name}","releases_url":"https://api.github.com/repos/porygonco/porybox/releases{/id}","deployments_url":"https://api.github.com/repos/porygonco/porybox/deployments","created_at":"2016-02-07T19:25:13Z","updated_at":"2016-02-18T17:48:22Z","pushed_at":"2016-05-18T07:21:26Z","git_url":"git://github.com/porygonco/porybox.git","ssh_url":"git@github.com:porygonco/porybox.git","clone_url":"https://github.com/porygonco/porybox.git","svn_url":"https://github.com/porygonco/porybox","homepage":"http://porygon.co","size":301,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":21,"forks":0,"open_issues":21,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/126"},"html":{"href":"https://github.com/porygonco/porybox/pull/126"},"issue":{"href":"https://api.github.com/repos/porygonco/porybox/issues/126"},"comments":{"href":"https://api.github.com/repos/porygonco/porybox/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/porygonco/porybox/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/porygonco/porybox/statuses/e7101e6a17068dbe45635a59d26e54412f5aa7ab"}}}}