{"action":"created","comment":{"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/comments/86066822","pull_request_review_id":6743644,"id":86066822,"diff_hunk":"@@ -0,0 +1,48 @@\n+'use strict';\n+\n+const express = require('express');\n+const app = express();\n+const path = require('path');\n+const storageScout = require('storage-scout');\n+const bodyreader = require('./body-parser');\n+const publicDir = path.join(__dirname, '../public');\n+\n+app.use(express.static(publicDir));\n+\n+app.get('/herding-group', (request, response) => {\n+    storageScout.readAll()\n+        .then(files => response.send(files))\n+        .catch(error => response.send(error));\n+});\n+\n+app.post('/herding-group', (request, response) => {\n+    bodyreader (request, (error, body) => {\n+        if(error) response.send(error)\n+        storageScout.create(JSON.stringify(body))\n+            .then(data => response.send(data))\n+            .catch(error => response.send(error));\n+    });\n+});\n+\n+app.get('/herding-group/:id', (request, response) => {\n+    storageScout.readOne(request.params.id)\n+        .then(id => response.send(id))\n+        .catch(error => response.send(error));\n+});\n+\n+app.put('/herding-group/:id', (request, response) => {\n+    bodyreader (request, (error, body) => {\n+        if(error) response.send(error)\n+        storageScout.update(request.params.id, JSON.stringify(body))\n+            .then(data => response.send(data))\n+            .catch(error => response.send(error));\n+    });\n+});\n+\n+app.delete('/herding-group/:id', (request, response) => {\n+    storageScout.delete(request.params.id)\n+        .then(result => response.send({ result: result }))\n+        .catch(error => response.send(error));\n+});\n+","path":"lib/app.js","position":47,"original_position":47,"commit_id":"e5705036466b59e721c366fa83804c4418f78dc3","original_commit_id":"e5705036466b59e721c366fa83804c4418f78dc3","user":{"login":"aaronbini","id":10383406,"avatar_url":"https://avatars.githubusercontent.com/u/10383406?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronbini","html_url":"https://github.com/aaronbini","followers_url":"https://api.github.com/users/aaronbini/followers","following_url":"https://api.github.com/users/aaronbini/following{/other_user}","gists_url":"https://api.github.com/users/aaronbini/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronbini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronbini/subscriptions","organizations_url":"https://api.github.com/users/aaronbini/orgs","repos_url":"https://api.github.com/users/aaronbini/repos","events_url":"https://api.github.com/users/aaronbini/events{/privacy}","received_events_url":"https://api.github.com/users/aaronbini/received_events","type":"User","site_admin":false},"body":"This looks really clean now with storageScout, nice work!","created_at":"2016-11-02T03:09:17Z","updated_at":"2016-11-02T03:09:17Z","html_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14#discussion_r86066822","pull_request_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/comments/86066822"},"html":{"href":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14#discussion_r86066822"},"pull_request":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14","id":91728909,"html_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14","diff_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14.diff","patch_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14.patch","issue_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/14","number":14,"state":"open","locked":false,"title":"Lab-1: @caraldi","user":{"login":"caraldi","id":20372264,"avatar_url":"https://avatars.githubusercontent.com/u/20372264?v=3","gravatar_id":"","url":"https://api.github.com/users/caraldi","html_url":"https://github.com/caraldi","followers_url":"https://api.github.com/users/caraldi/followers","following_url":"https://api.github.com/users/caraldi/following{/other_user}","gists_url":"https://api.github.com/users/caraldi/gists{/gist_id}","starred_url":"https://api.github.com/users/caraldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caraldi/subscriptions","organizations_url":"https://api.github.com/users/caraldi/orgs","repos_url":"https://api.github.com/users/caraldi/repos","events_url":"https://api.github.com/users/caraldi/events{/privacy}","received_events_url":"https://api.github.com/users/caraldi/received_events","type":"User","site_admin":false},"body":"- [ ] Need to debug storage-scout\r\n- [ ] Add /test and app.put","created_at":"2016-11-01T04:05:53Z","updated_at":"2016-11-02T03:13:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32b583bc6251da1d51de74ae691be47736f2bf9f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14/commits","review_comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14/comments","review_comment_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/14/comments","statuses_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/statuses/e5705036466b59e721c366fa83804c4418f78dc3","head":{"label":"caraldi:master","ref":"master","sha":"e5705036466b59e721c366fa83804c4418f78dc3","user":{"login":"caraldi","id":20372264,"avatar_url":"https://avatars.githubusercontent.com/u/20372264?v=3","gravatar_id":"","url":"https://api.github.com/users/caraldi","html_url":"https://github.com/caraldi","followers_url":"https://api.github.com/users/caraldi/followers","following_url":"https://api.github.com/users/caraldi/following{/other_user}","gists_url":"https://api.github.com/users/caraldi/gists{/gist_id}","starred_url":"https://api.github.com/users/caraldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caraldi/subscriptions","organizations_url":"https://api.github.com/users/caraldi/orgs","repos_url":"https://api.github.com/users/caraldi/repos","events_url":"https://api.github.com/users/caraldi/events{/privacy}","received_events_url":"https://api.github.com/users/caraldi/received_events","type":"User","site_admin":false},"repo":{"id":72478421,"name":"express-single-resource","full_name":"caraldi/express-single-resource","owner":{"login":"caraldi","id":20372264,"avatar_url":"https://avatars.githubusercontent.com/u/20372264?v=3","gravatar_id":"","url":"https://api.github.com/users/caraldi","html_url":"https://github.com/caraldi","followers_url":"https://api.github.com/users/caraldi/followers","following_url":"https://api.github.com/users/caraldi/following{/other_user}","gists_url":"https://api.github.com/users/caraldi/gists{/gist_id}","starred_url":"https://api.github.com/users/caraldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caraldi/subscriptions","organizations_url":"https://api.github.com/users/caraldi/orgs","repos_url":"https://api.github.com/users/caraldi/repos","events_url":"https://api.github.com/users/caraldi/events{/privacy}","received_events_url":"https://api.github.com/users/caraldi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caraldi/express-single-resource","description":null,"fork":true,"url":"https://api.github.com/repos/caraldi/express-single-resource","forks_url":"https://api.github.com/repos/caraldi/express-single-resource/forks","keys_url":"https://api.github.com/repos/caraldi/express-single-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caraldi/express-single-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caraldi/express-single-resource/teams","hooks_url":"https://api.github.com/repos/caraldi/express-single-resource/hooks","issue_events_url":"https://api.github.com/repos/caraldi/express-single-resource/issues/events{/number}","events_url":"https://api.github.com/repos/caraldi/express-single-resource/events","assignees_url":"https://api.github.com/repos/caraldi/express-single-resource/assignees{/user}","branches_url":"https://api.github.com/repos/caraldi/express-single-resource/branches{/branch}","tags_url":"https://api.github.com/repos/caraldi/express-single-resource/tags","blobs_url":"https://api.github.com/repos/caraldi/express-single-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caraldi/express-single-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caraldi/express-single-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/caraldi/express-single-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caraldi/express-single-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/caraldi/express-single-resource/languages","stargazers_url":"https://api.github.com/repos/caraldi/express-single-resource/stargazers","contributors_url":"https://api.github.com/repos/caraldi/express-single-resource/contributors","subscribers_url":"https://api.github.com/repos/caraldi/express-single-resource/subscribers","subscription_url":"https://api.github.com/repos/caraldi/express-single-resource/subscription","commits_url":"https://api.github.com/repos/caraldi/express-single-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/caraldi/express-single-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/caraldi/express-single-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/caraldi/express-single-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/caraldi/express-single-resource/contents/{+path}","compare_url":"https://api.github.com/repos/caraldi/express-single-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caraldi/express-single-resource/merges","archive_url":"https://api.github.com/repos/caraldi/express-single-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caraldi/express-single-resource/downloads","issues_url":"https://api.github.com/repos/caraldi/express-single-resource/issues{/number}","pulls_url":"https://api.github.com/repos/caraldi/express-single-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/caraldi/express-single-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/caraldi/express-single-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caraldi/express-single-resource/labels{/name}","releases_url":"https://api.github.com/repos/caraldi/express-single-resource/releases{/id}","deployments_url":"https://api.github.com/repos/caraldi/express-single-resource/deployments","created_at":"2016-10-31T21:12:59Z","updated_at":"2016-11-01T03:21:31Z","pushed_at":"2016-11-02T00:33:57Z","git_url":"git://github.com/caraldi/express-single-resource.git","ssh_url":"git@github.com:caraldi/express-single-resource.git","clone_url":"https://github.com/caraldi/express-single-resource.git","svn_url":"https://github.com/caraldi/express-single-resource","homepage":null,"size":10,"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:caraldi","ref":"caraldi","sha":"6267008466a1a773f1252885a417bd13e7802791","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":72221238,"name":"express-single-resource","full_name":"codefellows-portland-javascript-401d4/express-single-resource","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-single-resource","description":null,"fork":false,"url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource","forks_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/forks","keys_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/teams","hooks_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/hooks","issue_events_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/events{/number}","events_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/events","assignees_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/assignees{/user}","branches_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/branches{/branch}","tags_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/tags","blobs_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/languages","stargazers_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/stargazers","contributors_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/contributors","subscribers_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/subscribers","subscription_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/subscription","commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/contents/{+path}","compare_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/merges","archive_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/downloads","issues_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues{/number}","pulls_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/labels{/name}","releases_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/releases{/id}","deployments_url":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/deployments","created_at":"2016-10-28T15:52:27Z","updated_at":"2016-10-28T15:52:27Z","pushed_at":"2016-11-02T03:19:04Z","git_url":"git://github.com/codefellows-portland-javascript-401d4/express-single-resource.git","ssh_url":"git@github.com:codefellows-portland-javascript-401d4/express-single-resource.git","clone_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource.git","svn_url":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource","homepage":null,"size":5712,"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":31,"forks":25,"open_issues":31,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14"},"html":{"href":"https://github.com/codefellows-portland-javascript-401d4/express-single-resource/pull/14"},"issue":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/14"},"comments":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/codefellows-portland-javascript-401d4/express-single-resource/statuses/e5705036466b59e721c366fa83804c4418f78dc3"}}}}
{"actor":{"display_login":"aaronbini"}}