{"action":"created","comment":{"url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/comments/96363608","pull_request_review_id":16941548,"id":96363608,"diff_hunk":"@@ -32,9 +28,18 @@ app.get('/todos', (request, response) => {\n   });\n });\n \n+app.get('/todos/:id',(request, response)=> {\n+  connection.query('SELECT * FROM todos WHERE todoId = ?', [request.params.id], (error, data) => {\n+    if (data[0] === undefined) {\n+      return response.status(404).json({status: 404, data: error});","path":"index.js","position":18,"original_position":18,"commit_id":"2e5afe2432c1c8f4443067a35be939a03d6521b9","original_commit_id":"2e5afe2432c1c8f4443067a35be939a03d6521b9","user":{"login":"daanaerts","id":6762913,"avatar_url":"https://avatars.githubusercontent.com/u/6762913?v=3","gravatar_id":"","url":"https://api.github.com/users/daanaerts","html_url":"https://github.com/daanaerts","followers_url":"https://api.github.com/users/daanaerts/followers","following_url":"https://api.github.com/users/daanaerts/following{/other_user}","gists_url":"https://api.github.com/users/daanaerts/gists{/gist_id}","starred_url":"https://api.github.com/users/daanaerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanaerts/subscriptions","organizations_url":"https://api.github.com/users/daanaerts/orgs","repos_url":"https://api.github.com/users/daanaerts/repos","events_url":"https://api.github.com/users/daanaerts/events{/privacy}","received_events_url":"https://api.github.com/users/daanaerts/received_events","type":"User","site_admin":false},"body":"Hi guys, again, beautiful conversation! Really love it.\r\n\r\nPlease checkout this [Wikipedia page](https://en.wikipedia.org/wiki/HTTP_404) on http 404.\r\n\r\nTo give you my answer:\r\n\r\nIf you are looking for *a specific resource*, for example `/todos/5` and there is no todos with `todoId === 5` in the DB, then what you are looking for is really not found and the response should be 404. \r\n\r\nOn the other hand, if you search for something and nothing is found, the response code can be `200, because no results is a valid response for search. Do you see the difference between:\r\n\r\n`/todos/5` and `/todos?q.title=green`","created_at":"2017-01-17T08:40:20Z","updated_at":"2017-01-17T08:40:20Z","html_url":"https://github.com/daanaerts/examplemysql/pull/2#discussion_r96363608","pull_request_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/comments/96363608"},"html":{"href":"https://github.com/daanaerts/examplemysql/pull/2#discussion_r96363608"},"pull_request":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2","id":101607199,"html_url":"https://github.com/daanaerts/examplemysql/pull/2","diff_url":"https://github.com/daanaerts/examplemysql/pull/2.diff","patch_url":"https://github.com/daanaerts/examplemysql/pull/2.patch","issue_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/2","number":2,"state":"open","locked":false,"title":"getting a specific item by id is working","user":{"login":"beto0o0o","id":20149890,"avatar_url":"https://avatars.githubusercontent.com/u/20149890?v=3","gravatar_id":"","url":"https://api.github.com/users/beto0o0o","html_url":"https://github.com/beto0o0o","followers_url":"https://api.github.com/users/beto0o0o/followers","following_url":"https://api.github.com/users/beto0o0o/following{/other_user}","gists_url":"https://api.github.com/users/beto0o0o/gists{/gist_id}","starred_url":"https://api.github.com/users/beto0o0o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beto0o0o/subscriptions","organizations_url":"https://api.github.com/users/beto0o0o/orgs","repos_url":"https://api.github.com/users/beto0o0o/repos","events_url":"https://api.github.com/users/beto0o0o/events{/privacy}","received_events_url":"https://api.github.com/users/beto0o0o/received_events","type":"User","site_admin":false},"body":"Hey Daan,  please review my changes!","created_at":"2017-01-15T19:45:08Z","updated_at":"2017-01-17T08:40:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"716ac010500913a94c18c0991ab3624ea8e2b07d","assignee":{"login":"beto0o0o","id":20149890,"avatar_url":"https://avatars.githubusercontent.com/u/20149890?v=3","gravatar_id":"","url":"https://api.github.com/users/beto0o0o","html_url":"https://github.com/beto0o0o","followers_url":"https://api.github.com/users/beto0o0o/followers","following_url":"https://api.github.com/users/beto0o0o/following{/other_user}","gists_url":"https://api.github.com/users/beto0o0o/gists{/gist_id}","starred_url":"https://api.github.com/users/beto0o0o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beto0o0o/subscriptions","organizations_url":"https://api.github.com/users/beto0o0o/orgs","repos_url":"https://api.github.com/users/beto0o0o/repos","events_url":"https://api.github.com/users/beto0o0o/events{/privacy}","received_events_url":"https://api.github.com/users/beto0o0o/received_events","type":"User","site_admin":false},"assignees":[{"login":"beto0o0o","id":20149890,"avatar_url":"https://avatars.githubusercontent.com/u/20149890?v=3","gravatar_id":"","url":"https://api.github.com/users/beto0o0o","html_url":"https://github.com/beto0o0o","followers_url":"https://api.github.com/users/beto0o0o/followers","following_url":"https://api.github.com/users/beto0o0o/following{/other_user}","gists_url":"https://api.github.com/users/beto0o0o/gists{/gist_id}","starred_url":"https://api.github.com/users/beto0o0o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beto0o0o/subscriptions","organizations_url":"https://api.github.com/users/beto0o0o/orgs","repos_url":"https://api.github.com/users/beto0o0o/repos","events_url":"https://api.github.com/users/beto0o0o/events{/privacy}","received_events_url":"https://api.github.com/users/beto0o0o/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2/commits","review_comments_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2/comments","review_comment_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/2/comments","statuses_url":"https://api.github.com/repos/daanaerts/examplemysql/statuses/2e5afe2432c1c8f4443067a35be939a03d6521b9","head":{"label":"daanaerts:get-specific-value","ref":"get-specific-value","sha":"2e5afe2432c1c8f4443067a35be939a03d6521b9","user":{"login":"daanaerts","id":6762913,"avatar_url":"https://avatars.githubusercontent.com/u/6762913?v=3","gravatar_id":"","url":"https://api.github.com/users/daanaerts","html_url":"https://github.com/daanaerts","followers_url":"https://api.github.com/users/daanaerts/followers","following_url":"https://api.github.com/users/daanaerts/following{/other_user}","gists_url":"https://api.github.com/users/daanaerts/gists{/gist_id}","starred_url":"https://api.github.com/users/daanaerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanaerts/subscriptions","organizations_url":"https://api.github.com/users/daanaerts/orgs","repos_url":"https://api.github.com/users/daanaerts/repos","events_url":"https://api.github.com/users/daanaerts/events{/privacy}","received_events_url":"https://api.github.com/users/daanaerts/received_events","type":"User","site_admin":false},"repo":{"id":79030058,"name":"examplemysql","full_name":"daanaerts/examplemysql","owner":{"login":"daanaerts","id":6762913,"avatar_url":"https://avatars.githubusercontent.com/u/6762913?v=3","gravatar_id":"","url":"https://api.github.com/users/daanaerts","html_url":"https://github.com/daanaerts","followers_url":"https://api.github.com/users/daanaerts/followers","following_url":"https://api.github.com/users/daanaerts/following{/other_user}","gists_url":"https://api.github.com/users/daanaerts/gists{/gist_id}","starred_url":"https://api.github.com/users/daanaerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanaerts/subscriptions","organizations_url":"https://api.github.com/users/daanaerts/orgs","repos_url":"https://api.github.com/users/daanaerts/repos","events_url":"https://api.github.com/users/daanaerts/events{/privacy}","received_events_url":"https://api.github.com/users/daanaerts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daanaerts/examplemysql","description":"exmaple","fork":false,"url":"https://api.github.com/repos/daanaerts/examplemysql","forks_url":"https://api.github.com/repos/daanaerts/examplemysql/forks","keys_url":"https://api.github.com/repos/daanaerts/examplemysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daanaerts/examplemysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daanaerts/examplemysql/teams","hooks_url":"https://api.github.com/repos/daanaerts/examplemysql/hooks","issue_events_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/events{/number}","events_url":"https://api.github.com/repos/daanaerts/examplemysql/events","assignees_url":"https://api.github.com/repos/daanaerts/examplemysql/assignees{/user}","branches_url":"https://api.github.com/repos/daanaerts/examplemysql/branches{/branch}","tags_url":"https://api.github.com/repos/daanaerts/examplemysql/tags","blobs_url":"https://api.github.com/repos/daanaerts/examplemysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daanaerts/examplemysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daanaerts/examplemysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/daanaerts/examplemysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daanaerts/examplemysql/statuses/{sha}","languages_url":"https://api.github.com/repos/daanaerts/examplemysql/languages","stargazers_url":"https://api.github.com/repos/daanaerts/examplemysql/stargazers","contributors_url":"https://api.github.com/repos/daanaerts/examplemysql/contributors","subscribers_url":"https://api.github.com/repos/daanaerts/examplemysql/subscribers","subscription_url":"https://api.github.com/repos/daanaerts/examplemysql/subscription","commits_url":"https://api.github.com/repos/daanaerts/examplemysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/daanaerts/examplemysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/daanaerts/examplemysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/daanaerts/examplemysql/contents/{+path}","compare_url":"https://api.github.com/repos/daanaerts/examplemysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daanaerts/examplemysql/merges","archive_url":"https://api.github.com/repos/daanaerts/examplemysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daanaerts/examplemysql/downloads","issues_url":"https://api.github.com/repos/daanaerts/examplemysql/issues{/number}","pulls_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls{/number}","milestones_url":"https://api.github.com/repos/daanaerts/examplemysql/milestones{/number}","notifications_url":"https://api.github.com/repos/daanaerts/examplemysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daanaerts/examplemysql/labels{/name}","releases_url":"https://api.github.com/repos/daanaerts/examplemysql/releases{/id}","deployments_url":"https://api.github.com/repos/daanaerts/examplemysql/deployments","created_at":"2017-01-15T12:03:06Z","updated_at":"2017-01-15T12:04:38Z","pushed_at":"2017-01-17T00:31:43Z","git_url":"git://github.com/daanaerts/examplemysql.git","ssh_url":"git@github.com:daanaerts/examplemysql.git","clone_url":"https://github.com/daanaerts/examplemysql.git","svn_url":"https://github.com/daanaerts/examplemysql","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"daanaerts:master","ref":"master","sha":"5e8d0c72ebd43aba5e5161812f6715f22655503c","user":{"login":"daanaerts","id":6762913,"avatar_url":"https://avatars.githubusercontent.com/u/6762913?v=3","gravatar_id":"","url":"https://api.github.com/users/daanaerts","html_url":"https://github.com/daanaerts","followers_url":"https://api.github.com/users/daanaerts/followers","following_url":"https://api.github.com/users/daanaerts/following{/other_user}","gists_url":"https://api.github.com/users/daanaerts/gists{/gist_id}","starred_url":"https://api.github.com/users/daanaerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanaerts/subscriptions","organizations_url":"https://api.github.com/users/daanaerts/orgs","repos_url":"https://api.github.com/users/daanaerts/repos","events_url":"https://api.github.com/users/daanaerts/events{/privacy}","received_events_url":"https://api.github.com/users/daanaerts/received_events","type":"User","site_admin":false},"repo":{"id":79030058,"name":"examplemysql","full_name":"daanaerts/examplemysql","owner":{"login":"daanaerts","id":6762913,"avatar_url":"https://avatars.githubusercontent.com/u/6762913?v=3","gravatar_id":"","url":"https://api.github.com/users/daanaerts","html_url":"https://github.com/daanaerts","followers_url":"https://api.github.com/users/daanaerts/followers","following_url":"https://api.github.com/users/daanaerts/following{/other_user}","gists_url":"https://api.github.com/users/daanaerts/gists{/gist_id}","starred_url":"https://api.github.com/users/daanaerts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanaerts/subscriptions","organizations_url":"https://api.github.com/users/daanaerts/orgs","repos_url":"https://api.github.com/users/daanaerts/repos","events_url":"https://api.github.com/users/daanaerts/events{/privacy}","received_events_url":"https://api.github.com/users/daanaerts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daanaerts/examplemysql","description":"exmaple","fork":false,"url":"https://api.github.com/repos/daanaerts/examplemysql","forks_url":"https://api.github.com/repos/daanaerts/examplemysql/forks","keys_url":"https://api.github.com/repos/daanaerts/examplemysql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daanaerts/examplemysql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daanaerts/examplemysql/teams","hooks_url":"https://api.github.com/repos/daanaerts/examplemysql/hooks","issue_events_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/events{/number}","events_url":"https://api.github.com/repos/daanaerts/examplemysql/events","assignees_url":"https://api.github.com/repos/daanaerts/examplemysql/assignees{/user}","branches_url":"https://api.github.com/repos/daanaerts/examplemysql/branches{/branch}","tags_url":"https://api.github.com/repos/daanaerts/examplemysql/tags","blobs_url":"https://api.github.com/repos/daanaerts/examplemysql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daanaerts/examplemysql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daanaerts/examplemysql/git/refs{/sha}","trees_url":"https://api.github.com/repos/daanaerts/examplemysql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daanaerts/examplemysql/statuses/{sha}","languages_url":"https://api.github.com/repos/daanaerts/examplemysql/languages","stargazers_url":"https://api.github.com/repos/daanaerts/examplemysql/stargazers","contributors_url":"https://api.github.com/repos/daanaerts/examplemysql/contributors","subscribers_url":"https://api.github.com/repos/daanaerts/examplemysql/subscribers","subscription_url":"https://api.github.com/repos/daanaerts/examplemysql/subscription","commits_url":"https://api.github.com/repos/daanaerts/examplemysql/commits{/sha}","git_commits_url":"https://api.github.com/repos/daanaerts/examplemysql/git/commits{/sha}","comments_url":"https://api.github.com/repos/daanaerts/examplemysql/comments{/number}","issue_comment_url":"https://api.github.com/repos/daanaerts/examplemysql/issues/comments{/number}","contents_url":"https://api.github.com/repos/daanaerts/examplemysql/contents/{+path}","compare_url":"https://api.github.com/repos/daanaerts/examplemysql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daanaerts/examplemysql/merges","archive_url":"https://api.github.com/repos/daanaerts/examplemysql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daanaerts/examplemysql/downloads","issues_url":"https://api.github.com/repos/daanaerts/examplemysql/issues{/number}","pulls_url":"https://api.github.com/repos/daanaerts/examplemysql/pulls{/number}","milestones_url":"https://api.github.com/repos/daanaerts/examplemysql/milestones{/number}","notifications_url":"https://api.github.com/repos/daanaerts/examplemysql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daanaerts/examplemysql/labels{/name}","releases_url":"https://api.github.com/repos/daanaerts/examplemysql/releases{/id}","deployments_url":"https://api.github.com/repos/daanaerts/examplemysql/deployments","created_at":"2017-01-15T12:03:06Z","updated_at":"2017-01-15T12:04:38Z","pushed_at":"2017-01-17T00:31:43Z","git_url":"git://github.com/daanaerts/examplemysql.git","ssh_url":"git@github.com:daanaerts/examplemysql.git","clone_url":"https://github.com/daanaerts/examplemysql.git","svn_url":"https://github.com/daanaerts/examplemysql","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2"},"html":{"href":"https://github.com/daanaerts/examplemysql/pull/2"},"issue":{"href":"https://api.github.com/repos/daanaerts/examplemysql/issues/2"},"comments":{"href":"https://api.github.com/repos/daanaerts/examplemysql/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/daanaerts/examplemysql/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/daanaerts/examplemysql/statuses/2e5afe2432c1c8f4443067a35be939a03d6521b9"}}}}
{"actor":{"display_login":"daanaerts"}}