{"action":"created","comment":{"url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/comments/139102202","pull_request_review_id":62988775,"id":139102202,"diff_hunk":"@@ -25,10 +23,30 @@ router.get('/', function(req, res, next) {\n   };\n \n   /**\n-   * Load the entries file\n+   * Load the entries file from the database\n    */\n   mongoose.connect(mongoConnection);\n     Entry.find({}, renderEntries);\n });\n \n+//Raring Route -- Khaled\n+router.post('/rating', function(req, res, next) {\n+  const id = req.body.id;\n+  const helpful = req.body.helpful  \n+  const renderEntries = function(error, entry) {\n+    if (error) {\n+      console.log(error);\n+      res.sendStatus(400)","path":"routes/index.js","position":33,"original_position":33,"commit_id":"1ab30545e4a4ee23136ae382be9808a990bbfa4f","original_commit_id":"1ab30545e4a4ee23136ae382be9808a990bbfa4f","user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars2.githubusercontent.com/u/2306629?v=4","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"body":"A `400` status usually indicates an authentication error (ie - \"You are not allowed to do this.\"). In your case, I think you want to render a `500` status (ie - \"The server ran into an error.\").","created_at":"2017-09-15T09:24:52Z","updated_at":"2017-09-15T09:29:58Z","html_url":"https://github.com/NateWr/cyf-faq-group/pull/15#discussion_r139102202","pull_request_url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/comments/139102202"},"html":{"href":"https://github.com/NateWr/cyf-faq-group/pull/15#discussion_r139102202"},"pull_request":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15","id":140175800,"html_url":"https://github.com/NateWr/cyf-faq-group/pull/15","diff_url":"https://github.com/NateWr/cyf-faq-group/pull/15.diff","patch_url":"https://github.com/NateWr/cyf-faq-group/pull/15.patch","issue_url":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/15","number":15,"state":"open","locked":false,"title":"#6 created a Client-side functionality for the Helpful and Not Helpfu…","user":{"login":"Yjohn","id":20722452,"avatar_url":"https://avatars1.githubusercontent.com/u/20722452?v=4","gravatar_id":"","url":"https://api.github.com/users/Yjohn","html_url":"https://github.com/Yjohn","followers_url":"https://api.github.com/users/Yjohn/followers","following_url":"https://api.github.com/users/Yjohn/following{/other_user}","gists_url":"https://api.github.com/users/Yjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/Yjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yjohn/subscriptions","organizations_url":"https://api.github.com/users/Yjohn/orgs","repos_url":"https://api.github.com/users/Yjohn/repos","events_url":"https://api.github.com/users/Yjohn/events{/privacy}","received_events_url":"https://api.github.com/users/Yjohn/received_events","type":"User","site_admin":false},"body":"#6 it needs more work to make the buttons functional ","created_at":"2017-09-09T16:32:13Z","updated_at":"2017-09-15T09:29:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8344c20fa93829de672ff54ba3616d5f28997385","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15/commits","review_comments_url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15/comments","review_comment_url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/15/comments","statuses_url":"https://api.github.com/repos/NateWr/cyf-faq-group/statuses/1ab30545e4a4ee23136ae382be9808a990bbfa4f","head":{"label":"Yjohn:helpfullButtons","ref":"helpfullButtons","sha":"1ab30545e4a4ee23136ae382be9808a990bbfa4f","user":{"login":"Yjohn","id":20722452,"avatar_url":"https://avatars1.githubusercontent.com/u/20722452?v=4","gravatar_id":"","url":"https://api.github.com/users/Yjohn","html_url":"https://github.com/Yjohn","followers_url":"https://api.github.com/users/Yjohn/followers","following_url":"https://api.github.com/users/Yjohn/following{/other_user}","gists_url":"https://api.github.com/users/Yjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/Yjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yjohn/subscriptions","organizations_url":"https://api.github.com/users/Yjohn/orgs","repos_url":"https://api.github.com/users/Yjohn/repos","events_url":"https://api.github.com/users/Yjohn/events{/privacy}","received_events_url":"https://api.github.com/users/Yjohn/received_events","type":"User","site_admin":false},"repo":{"id":102256760,"name":"cyf-faq-group","full_name":"Yjohn/cyf-faq-group","owner":{"login":"Yjohn","id":20722452,"avatar_url":"https://avatars1.githubusercontent.com/u/20722452?v=4","gravatar_id":"","url":"https://api.github.com/users/Yjohn","html_url":"https://github.com/Yjohn","followers_url":"https://api.github.com/users/Yjohn/followers","following_url":"https://api.github.com/users/Yjohn/following{/other_user}","gists_url":"https://api.github.com/users/Yjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/Yjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yjohn/subscriptions","organizations_url":"https://api.github.com/users/Yjohn/orgs","repos_url":"https://api.github.com/users/Yjohn/repos","events_url":"https://api.github.com/users/Yjohn/events{/privacy}","received_events_url":"https://api.github.com/users/Yjohn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yjohn/cyf-faq-group","description":"The FAQ app group project!","fork":true,"url":"https://api.github.com/repos/Yjohn/cyf-faq-group","forks_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/forks","keys_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/teams","hooks_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/hooks","issue_events_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/issues/events{/number}","events_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/events","assignees_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/assignees{/user}","branches_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/branches{/branch}","tags_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/tags","blobs_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/statuses/{sha}","languages_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/languages","stargazers_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/stargazers","contributors_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/contributors","subscribers_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/subscribers","subscription_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/subscription","commits_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/contents/{+path}","compare_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/merges","archive_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/downloads","issues_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/issues{/number}","pulls_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/pulls{/number}","milestones_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/milestones{/number}","notifications_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/labels{/name}","releases_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/releases{/id}","deployments_url":"https://api.github.com/repos/Yjohn/cyf-faq-group/deployments","created_at":"2017-09-03T10:26:36Z","updated_at":"2017-09-03T10:26:37Z","pushed_at":"2017-09-14T21:12:37Z","git_url":"git://github.com/Yjohn/cyf-faq-group.git","ssh_url":"git@github.com:Yjohn/cyf-faq-group.git","clone_url":"https://github.com/Yjohn/cyf-faq-group.git","svn_url":"https://github.com/Yjohn/cyf-faq-group","homepage":null,"size":198,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"NateWr:master","ref":"master","sha":"d7943672baf22f0f502b622b1d2120e6ea3df4cf","user":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars2.githubusercontent.com/u/2306629?v=4","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"repo":{"id":102212710,"name":"cyf-faq-group","full_name":"NateWr/cyf-faq-group","owner":{"login":"NateWr","id":2306629,"avatar_url":"https://avatars2.githubusercontent.com/u/2306629?v=4","gravatar_id":"","url":"https://api.github.com/users/NateWr","html_url":"https://github.com/NateWr","followers_url":"https://api.github.com/users/NateWr/followers","following_url":"https://api.github.com/users/NateWr/following{/other_user}","gists_url":"https://api.github.com/users/NateWr/gists{/gist_id}","starred_url":"https://api.github.com/users/NateWr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NateWr/subscriptions","organizations_url":"https://api.github.com/users/NateWr/orgs","repos_url":"https://api.github.com/users/NateWr/repos","events_url":"https://api.github.com/users/NateWr/events{/privacy}","received_events_url":"https://api.github.com/users/NateWr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NateWr/cyf-faq-group","description":"The FAQ app group project!","fork":false,"url":"https://api.github.com/repos/NateWr/cyf-faq-group","forks_url":"https://api.github.com/repos/NateWr/cyf-faq-group/forks","keys_url":"https://api.github.com/repos/NateWr/cyf-faq-group/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NateWr/cyf-faq-group/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NateWr/cyf-faq-group/teams","hooks_url":"https://api.github.com/repos/NateWr/cyf-faq-group/hooks","issue_events_url":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/events{/number}","events_url":"https://api.github.com/repos/NateWr/cyf-faq-group/events","assignees_url":"https://api.github.com/repos/NateWr/cyf-faq-group/assignees{/user}","branches_url":"https://api.github.com/repos/NateWr/cyf-faq-group/branches{/branch}","tags_url":"https://api.github.com/repos/NateWr/cyf-faq-group/tags","blobs_url":"https://api.github.com/repos/NateWr/cyf-faq-group/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NateWr/cyf-faq-group/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NateWr/cyf-faq-group/git/refs{/sha}","trees_url":"https://api.github.com/repos/NateWr/cyf-faq-group/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NateWr/cyf-faq-group/statuses/{sha}","languages_url":"https://api.github.com/repos/NateWr/cyf-faq-group/languages","stargazers_url":"https://api.github.com/repos/NateWr/cyf-faq-group/stargazers","contributors_url":"https://api.github.com/repos/NateWr/cyf-faq-group/contributors","subscribers_url":"https://api.github.com/repos/NateWr/cyf-faq-group/subscribers","subscription_url":"https://api.github.com/repos/NateWr/cyf-faq-group/subscription","commits_url":"https://api.github.com/repos/NateWr/cyf-faq-group/commits{/sha}","git_commits_url":"https://api.github.com/repos/NateWr/cyf-faq-group/git/commits{/sha}","comments_url":"https://api.github.com/repos/NateWr/cyf-faq-group/comments{/number}","issue_comment_url":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/comments{/number}","contents_url":"https://api.github.com/repos/NateWr/cyf-faq-group/contents/{+path}","compare_url":"https://api.github.com/repos/NateWr/cyf-faq-group/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NateWr/cyf-faq-group/merges","archive_url":"https://api.github.com/repos/NateWr/cyf-faq-group/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NateWr/cyf-faq-group/downloads","issues_url":"https://api.github.com/repos/NateWr/cyf-faq-group/issues{/number}","pulls_url":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls{/number}","milestones_url":"https://api.github.com/repos/NateWr/cyf-faq-group/milestones{/number}","notifications_url":"https://api.github.com/repos/NateWr/cyf-faq-group/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NateWr/cyf-faq-group/labels{/name}","releases_url":"https://api.github.com/repos/NateWr/cyf-faq-group/releases{/id}","deployments_url":"https://api.github.com/repos/NateWr/cyf-faq-group/deployments","created_at":"2017-09-02T17:31:44Z","updated_at":"2017-09-03T09:31:11Z","pushed_at":"2017-09-14T21:08:46Z","git_url":"git://github.com/NateWr/cyf-faq-group.git","ssh_url":"git@github.com:NateWr/cyf-faq-group.git","clone_url":"https://github.com/NateWr/cyf-faq-group.git","svn_url":"https://github.com/NateWr/cyf-faq-group","homepage":null,"size":195,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":12,"forks":4,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15"},"html":{"href":"https://github.com/NateWr/cyf-faq-group/pull/15"},"issue":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/15"},"comments":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/NateWr/cyf-faq-group/statuses/1ab30545e4a4ee23136ae382be9808a990bbfa4f"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"NateWr"}}