{"action":"created","comment":{"url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/comments/135044489","pull_request_review_id":58411529,"id":135044489,"diff_hunk":"@@ -0,0 +1,65 @@\n+'use strict';\n+\n+const http = require('http');\n+const PORT = process.env.PORT || 3000;\n+const uuid = require('uuid');\n+\n+const Router = require('./lib/router');\n+const router = new Router();\n+\n+router.get('/', function(req,res){\n+  console.log(req.method,req.url);\n+  res.writeHead(200,{'content-type': 'text/plain'});\n+  res.write('Routed');\n+  res.end();\n+});\n+\n+const storage = {};\n+\n+router.post('/note',(req,res) => {\n+  let note = Object.assign({\n+    id: uuid.v1(),\n+  },req.body);\n+  storage[note.id] = note;\n+  console.log('note ',note);\n+  res.writeHead(200,{'content-type': 'application/json'});\n+  res.write(JSON.stringify(note));\n+  res.end();\n+});\n+\n+router.get('/note',(req,res) => {\n+  console.log(req.url.query.id);\n+  var note = storage[req.url.query.id];\n+\n+  if (!req.url.query.id){\n+    console.log(req.url.query.id);\n+    res.writeHead(400,\n+      {'content-type': 'text/plain'});\n+    res.write('Bad Request');\n+    return res.end();\n+  }\n+  if (!storage[req.url.query.id]){","path":"lab-dustin/server.js","position":41,"original_position":41,"commit_id":"bea79c8a89e39ec04512d5e53e1ef71f231d52cd","original_commit_id":"bea79c8a89e39ec04512d5e53e1ef71f231d52cd","user":{"login":"dahlbyk","id":133987,"avatar_url":"https://avatars1.githubusercontent.com/u/133987?v=4","gravatar_id":"","url":"https://api.github.com/users/dahlbyk","html_url":"https://github.com/dahlbyk","followers_url":"https://api.github.com/users/dahlbyk/followers","following_url":"https://api.github.com/users/dahlbyk/following{/other_user}","gists_url":"https://api.github.com/users/dahlbyk/gists{/gist_id}","starred_url":"https://api.github.com/users/dahlbyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dahlbyk/subscriptions","organizations_url":"https://api.github.com/users/dahlbyk/orgs","repos_url":"https://api.github.com/users/dahlbyk/repos","events_url":"https://api.github.com/users/dahlbyk/events{/privacy}","received_events_url":"https://api.github.com/users/dahlbyk/received_events","type":"User","site_admin":false},"body":"This can be `!note`","created_at":"2017-08-24T15:15:06Z","updated_at":"2017-08-24T15:15:07Z","html_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2#discussion_r135044489","pull_request_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/comments/135044489"},"html":{"href":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2#discussion_r135044489"},"pull_request":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2","id":137357621,"html_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2","diff_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2.diff","patch_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2.patch","issue_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/2","number":2,"state":"open","locked":false,"title":"Lab dustin","user":{"login":"dustinyschild","id":28175044,"avatar_url":"https://avatars3.githubusercontent.com/u/28175044?v=4","gravatar_id":"","url":"https://api.github.com/users/dustinyschild","html_url":"https://github.com/dustinyschild","followers_url":"https://api.github.com/users/dustinyschild/followers","following_url":"https://api.github.com/users/dustinyschild/following{/other_user}","gists_url":"https://api.github.com/users/dustinyschild/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinyschild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinyschild/subscriptions","organizations_url":"https://api.github.com/users/dustinyschild/orgs","repos_url":"https://api.github.com/users/dustinyschild/repos","events_url":"https://api.github.com/users/dustinyschild/events{/privacy}","received_events_url":"https://api.github.com/users/dustinyschild/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-24T02:37:35Z","updated_at":"2017-08-24T15:15:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7943cf8404b2dc3e9a6fda0b3b5df682133ba07","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2/commits","review_comments_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2/comments","review_comment_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/2/comments","statuses_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/statuses/bea79c8a89e39ec04512d5e53e1ef71f231d52cd","head":{"label":"dustinyschild:lab-dustin","ref":"lab-dustin","sha":"bea79c8a89e39ec04512d5e53e1ef71f231d52cd","user":{"login":"dustinyschild","id":28175044,"avatar_url":"https://avatars3.githubusercontent.com/u/28175044?v=4","gravatar_id":"","url":"https://api.github.com/users/dustinyschild","html_url":"https://github.com/dustinyschild","followers_url":"https://api.github.com/users/dustinyschild/followers","following_url":"https://api.github.com/users/dustinyschild/following{/other_user}","gists_url":"https://api.github.com/users/dustinyschild/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinyschild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinyschild/subscriptions","organizations_url":"https://api.github.com/users/dustinyschild/orgs","repos_url":"https://api.github.com/users/dustinyschild/repos","events_url":"https://api.github.com/users/dustinyschild/events{/privacy}","received_events_url":"https://api.github.com/users/dustinyschild/received_events","type":"User","site_admin":false},"repo":{"id":101197792,"name":"08-vanilla_rest_api","full_name":"dustinyschild/08-vanilla_rest_api","owner":{"login":"dustinyschild","id":28175044,"avatar_url":"https://avatars3.githubusercontent.com/u/28175044?v=4","gravatar_id":"","url":"https://api.github.com/users/dustinyschild","html_url":"https://github.com/dustinyschild","followers_url":"https://api.github.com/users/dustinyschild/followers","following_url":"https://api.github.com/users/dustinyschild/following{/other_user}","gists_url":"https://api.github.com/users/dustinyschild/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinyschild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinyschild/subscriptions","organizations_url":"https://api.github.com/users/dustinyschild/orgs","repos_url":"https://api.github.com/users/dustinyschild/repos","events_url":"https://api.github.com/users/dustinyschild/events{/privacy}","received_events_url":"https://api.github.com/users/dustinyschild/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dustinyschild/08-vanilla_rest_api","description":null,"fork":true,"url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api","forks_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/forks","keys_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/teams","hooks_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/hooks","issue_events_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/issues/events{/number}","events_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/events","assignees_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/assignees{/user}","branches_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/branches{/branch}","tags_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/tags","blobs_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/statuses/{sha}","languages_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/languages","stargazers_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/stargazers","contributors_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/contributors","subscribers_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/subscribers","subscription_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/subscription","commits_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/contents/{+path}","compare_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/merges","archive_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/downloads","issues_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/issues{/number}","pulls_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/pulls{/number}","milestones_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/milestones{/number}","notifications_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/labels{/name}","releases_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/releases{/id}","deployments_url":"https://api.github.com/repos/dustinyschild/08-vanilla_rest_api/deployments","created_at":"2017-08-23T15:44:20Z","updated_at":"2017-08-21T20:12:59Z","pushed_at":"2017-08-24T15:08:08Z","git_url":"git://github.com/dustinyschild/08-vanilla_rest_api.git","ssh_url":"git@github.com:dustinyschild/08-vanilla_rest_api.git","clone_url":"https://github.com/dustinyschild/08-vanilla_rest_api.git","svn_url":"https://github.com/dustinyschild/08-vanilla_rest_api","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"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":"DeltaVCode-cr-401js-2017:master","ref":"master","sha":"6b767da77379a9ef1e6046698d86615a096b4b31","user":{"login":"DeltaVCode-cr-401js-2017","id":31000131,"avatar_url":"https://avatars2.githubusercontent.com/u/31000131?v=4","gravatar_id":"","url":"https://api.github.com/users/DeltaVCode-cr-401js-2017","html_url":"https://github.com/DeltaVCode-cr-401js-2017","followers_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/followers","following_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/following{/other_user}","gists_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/gists{/gist_id}","starred_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/subscriptions","organizations_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/orgs","repos_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/repos","events_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/events{/privacy}","received_events_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/received_events","type":"Organization","site_admin":false},"repo":{"id":100988838,"name":"08-vanilla_rest_api","full_name":"DeltaVCode-cr-401js-2017/08-vanilla_rest_api","owner":{"login":"DeltaVCode-cr-401js-2017","id":31000131,"avatar_url":"https://avatars2.githubusercontent.com/u/31000131?v=4","gravatar_id":"","url":"https://api.github.com/users/DeltaVCode-cr-401js-2017","html_url":"https://github.com/DeltaVCode-cr-401js-2017","followers_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/followers","following_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/following{/other_user}","gists_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/gists{/gist_id}","starred_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/subscriptions","organizations_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/orgs","repos_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/repos","events_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/events{/privacy}","received_events_url":"https://api.github.com/users/DeltaVCode-cr-401js-2017/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api","description":null,"fork":false,"url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api","forks_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/forks","keys_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/teams","hooks_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/hooks","issue_events_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/events{/number}","events_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/events","assignees_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/assignees{/user}","branches_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/branches{/branch}","tags_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/tags","blobs_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/statuses/{sha}","languages_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/languages","stargazers_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/stargazers","contributors_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/contributors","subscribers_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/subscribers","subscription_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/subscription","commits_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/contents/{+path}","compare_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/merges","archive_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/downloads","issues_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues{/number}","pulls_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls{/number}","milestones_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/milestones{/number}","notifications_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/labels{/name}","releases_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/releases{/id}","deployments_url":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/deployments","created_at":"2017-08-21T20:12:59Z","updated_at":"2017-08-21T20:12:59Z","pushed_at":"2017-08-24T15:08:16Z","git_url":"git://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api.git","ssh_url":"git@github.com:DeltaVCode-cr-401js-2017/08-vanilla_rest_api.git","clone_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api.git","svn_url":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2"},"html":{"href":"https://github.com/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pull/2"},"issue":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/2"},"comments":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/DeltaVCode-cr-401js-2017/08-vanilla_rest_api/statuses/bea79c8a89e39ec04512d5e53e1ef71f231d52cd"}}}}
{"actor":{"display_login":"dahlbyk"}}