{"action":"created","comment":{"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/comments/86918138","pull_request_review_id":7551480,"id":86918138,"diff_hunk":"@@ -0,0 +1,71 @@\n+const express = require('express');\n+const router = express.Router();\n+const url = require('url');\n+const qs = require('qs');\n+const bodyparser = require('body-parser').json();\n+const Animeshow = require('../models/animeshow');\n+const Animechar = require('../models/animechar');\n+\n+router  \n+    .get('/', (req, res, next) => {\n+        const queryString = (qs.parse(url.parse(req.url).query));\n+        const query = {};\n+        const subQuery = {};\n+        if (req.query.name) query.name = req.query.name;\n+        Animeshow.find(query)\n+            .then(animeshow => res.send(animeshow))\n+            .catch(next);\n+    })\n+\n+    .get('/:id', (req, res, next) => {\n+        const showId = req.params.id;\n+        Promise\n+            .all([\n+                Animechar\n+                    .find({showId})\n+                    .lean(),\n+                Animeshow\n+                    .findById(showId)\n+                    .select('showname airdate genre')\n+                    .lean()\n+            ])\n+            .then(([chars, show]) => {\n+                show.characters = chars;\n+                res.send(show);\n+            })\n+            .catch(next);\n+    })\n+\n+    .delete('/:id', (req, res, next) => {\n+        Animeshow.findByIdAndRemove(req.params.id)\n+            .then(animeshow => res.send(animeshow))\n+            .catch(next);\n+    })\n+\n+    .put('/:id', bodyparser, (req, res, next) => {\n+        Animeshow.findByUpdateAndRemoev(req.params.id, req.body, {new: true})","path":"lib/routes/animeshows.js","position":46,"original_position":46,"commit_id":"d477227df7418ef759890859fd15dbc22fdff982","original_commit_id":"d477227df7418ef759890859fd15dbc22fdff982","user":{"login":"GeoffreyEmerson","id":5684761,"avatar_url":"https://avatars.githubusercontent.com/u/5684761?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoffreyEmerson","html_url":"https://github.com/GeoffreyEmerson","followers_url":"https://api.github.com/users/GeoffreyEmerson/followers","following_url":"https://api.github.com/users/GeoffreyEmerson/following{/other_user}","gists_url":"https://api.github.com/users/GeoffreyEmerson/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoffreyEmerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoffreyEmerson/subscriptions","organizations_url":"https://api.github.com/users/GeoffreyEmerson/orgs","repos_url":"https://api.github.com/users/GeoffreyEmerson/repos","events_url":"https://api.github.com/users/GeoffreyEmerson/events{/privacy}","received_events_url":"https://api.github.com/users/GeoffreyEmerson/received_events","type":"User","site_admin":false},"body":"Typo. Must not be testing this route! ","created_at":"2016-11-08T03:31:26Z","updated_at":"2016-11-08T03:31:26Z","html_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18#discussion_r86918138","pull_request_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/comments/86918138"},"html":{"href":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18#discussion_r86918138"},"pull_request":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18","id":92528328,"html_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18","diff_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18.diff","patch_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18.patch","issue_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/18","number":18,"state":"closed","locked":false,"title":"This is the submission for Chris Bruner and AJ Reel.","user":{"login":"Waxhoya","id":6881407,"avatar_url":"https://avatars.githubusercontent.com/u/6881407?v=3","gravatar_id":"","url":"https://api.github.com/users/Waxhoya","html_url":"https://github.com/Waxhoya","followers_url":"https://api.github.com/users/Waxhoya/followers","following_url":"https://api.github.com/users/Waxhoya/following{/other_user}","gists_url":"https://api.github.com/users/Waxhoya/gists{/gist_id}","starred_url":"https://api.github.com/users/Waxhoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waxhoya/subscriptions","organizations_url":"https://api.github.com/users/Waxhoya/orgs","repos_url":"https://api.github.com/users/Waxhoya/repos","events_url":"https://api.github.com/users/Waxhoya/events{/privacy}","received_events_url":"https://api.github.com/users/Waxhoya/received_events","type":"User","site_admin":false},"body":"This is the submission for Chris Bruner and AJ Reel.","created_at":"2016-11-07T06:06:55Z","updated_at":"2016-11-08T03:31:26Z","closed_at":"2016-11-08T03:09:30Z","merged_at":"2016-11-08T03:09:30Z","merge_commit_sha":"c84c3a13638c2fd372b43e3ded846fdebb7324c9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18/commits","review_comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18/comments","review_comment_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/18/comments","statuses_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/statuses/d477227df7418ef759890859fd15dbc22fdff982","head":{"label":"Waxhoya:master","ref":"master","sha":"d477227df7418ef759890859fd15dbc22fdff982","user":{"login":"Waxhoya","id":6881407,"avatar_url":"https://avatars.githubusercontent.com/u/6881407?v=3","gravatar_id":"","url":"https://api.github.com/users/Waxhoya","html_url":"https://github.com/Waxhoya","followers_url":"https://api.github.com/users/Waxhoya/followers","following_url":"https://api.github.com/users/Waxhoya/following{/other_user}","gists_url":"https://api.github.com/users/Waxhoya/gists{/gist_id}","starred_url":"https://api.github.com/users/Waxhoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waxhoya/subscriptions","organizations_url":"https://api.github.com/users/Waxhoya/orgs","repos_url":"https://api.github.com/users/Waxhoya/repos","events_url":"https://api.github.com/users/Waxhoya/events{/privacy}","received_events_url":"https://api.github.com/users/Waxhoya/received_events","type":"User","site_admin":false},"repo":{"id":72783287,"name":"express-mongo-relations","full_name":"Waxhoya/express-mongo-relations","owner":{"login":"Waxhoya","id":6881407,"avatar_url":"https://avatars.githubusercontent.com/u/6881407?v=3","gravatar_id":"","url":"https://api.github.com/users/Waxhoya","html_url":"https://github.com/Waxhoya","followers_url":"https://api.github.com/users/Waxhoya/followers","following_url":"https://api.github.com/users/Waxhoya/following{/other_user}","gists_url":"https://api.github.com/users/Waxhoya/gists{/gist_id}","starred_url":"https://api.github.com/users/Waxhoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Waxhoya/subscriptions","organizations_url":"https://api.github.com/users/Waxhoya/orgs","repos_url":"https://api.github.com/users/Waxhoya/repos","events_url":"https://api.github.com/users/Waxhoya/events{/privacy}","received_events_url":"https://api.github.com/users/Waxhoya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Waxhoya/express-mongo-relations","description":null,"fork":true,"url":"https://api.github.com/repos/Waxhoya/express-mongo-relations","forks_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/forks","keys_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/teams","hooks_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/hooks","issue_events_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/issues/events{/number}","events_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/events","assignees_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/assignees{/user}","branches_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/branches{/branch}","tags_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/tags","blobs_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/git/refs{/sha}","trees_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/statuses/{sha}","languages_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/languages","stargazers_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/stargazers","contributors_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/contributors","subscribers_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/subscribers","subscription_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/subscription","commits_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/commits{/sha}","git_commits_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/git/commits{/sha}","comments_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/comments{/number}","issue_comment_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/issues/comments{/number}","contents_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/contents/{+path}","compare_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/merges","archive_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/downloads","issues_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/issues{/number}","pulls_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/pulls{/number}","milestones_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/milestones{/number}","notifications_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/labels{/name}","releases_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/releases{/id}","deployments_url":"https://api.github.com/repos/Waxhoya/express-mongo-relations/deployments","created_at":"2016-11-03T20:19:07Z","updated_at":"2016-11-04T20:40:18Z","pushed_at":"2016-11-07T06:01:44Z","git_url":"git://github.com/Waxhoya/express-mongo-relations.git","ssh_url":"git@github.com:Waxhoya/express-mongo-relations.git","clone_url":"https://github.com/Waxhoya/express-mongo-relations.git","svn_url":"https://github.com/Waxhoya/express-mongo-relations","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codefellows-portland-javascript-401d4:Waxhoya","ref":"Waxhoya","sha":"f9f1b88f16a58fb01c30f6dd34359bc5fe589085","user":{"login":"codefellows-portland-javascript-401d4","id":22821676,"avatar_url":"https://avatars.githubusercontent.com/u/22821676?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-portland-javascript-401d4","html_url":"https://github.com/codefellows-portland-javascript-401d4","followers_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/followers","following_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/subscriptions","organizations_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/orgs","repos_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/repos","events_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/received_events","type":"Organization","site_admin":false},"repo":{"id":72775067,"name":"express-mongo-relations","full_name":"codefellows-portland-javascript-401d4/express-mongo-relations","owner":{"login":"codefellows-portland-javascript-401d4","id":22821676,"avatar_url":"https://avatars.githubusercontent.com/u/22821676?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-portland-javascript-401d4","html_url":"https://github.com/codefellows-portland-javascript-401d4","followers_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/followers","following_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/subscriptions","organizations_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/orgs","repos_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/repos","events_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-portland-javascript-401d4/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations","description":null,"fork":false,"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations","forks_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/forks","keys_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/teams","hooks_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/hooks","issue_events_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/events{/number}","events_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/events","assignees_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/assignees{/user}","branches_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/branches{/branch}","tags_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/tags","blobs_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/git/refs{/sha}","trees_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/statuses/{sha}","languages_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/languages","stargazers_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/stargazers","contributors_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/contributors","subscribers_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/subscribers","subscription_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/subscription","commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/commits{/sha}","git_commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/git/commits{/sha}","comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/comments{/number}","issue_comment_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/comments{/number}","contents_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/contents/{+path}","compare_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/merges","archive_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/downloads","issues_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues{/number}","pulls_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls{/number}","milestones_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/milestones{/number}","notifications_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/labels{/name}","releases_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/releases{/id}","deployments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/deployments","created_at":"2016-11-03T18:31:38Z","updated_at":"2016-11-03T18:31:38Z","pushed_at":"2016-11-08T03:09:31Z","git_url":"git://github.com/codefellows-portland-javascript-401d4/express-mongo-relations.git","ssh_url":"git@github.com:codefellows-portland-javascript-401d4/express-mongo-relations.git","clone_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations.git","svn_url":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations","homepage":null,"size":5226,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":18,"forks":25,"open_issues":18,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18"},"html":{"href":"https://github.com/codefellows-portland-javascript-401d4/express-mongo-relations/pull/18"},"issue":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/18"},"comments":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-mongo-relations/statuses/d477227df7418ef759890859fd15dbc22fdff982"}}}}
{"actor":{"display_login":"GeoffreyEmerson"}}