{"action":"created","comment":{"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/comments/92949448","pull_request_review_id":13471164,"id":92949448,"diff_hunk":"@@ -0,0 +1,43 @@\n+'use strict';\n+\n+const storage = {};\n+\n+module.exports = exports = {};\n+\n+exports.createItem = function(schemaName, item){\n+  // do error handling\n+  if (!schemaName) return Promise.reject(new Error('expected schemaName'));\n+  if (!item) return Promise.reject(new Error('expect item'));\n+\n+  if(!storage[schemaName]) storage[schemaName] = {};\n+  storage[schemaName][item.id] = item;\n+  return Promise.resolve(item);\n+};\n+\n+exports.fetchItem = function(schemaName, id){\n+  // do error handling\n+  return new Promise((resolve, reject) => {\n+    if (!schemaName) return reject(new Error('expected schemaName'));\n+    if (!id) return reject(new Error('expected id'));\n+\n+    var schema = storage[schemaName];\n+    if(!schema) return reject(new Error('schema not found'));\n+    var item = schema[id];\n+    if(!item) return reject(new Error('item not found'));\n+    resolve(item);\n+  });\n+};\n+\n+exports.deleteItem = function(schemaName, id){","path":"lab-carolina/lib/storage.js","position":31,"original_position":31,"commit_id":"4078ac85e585412ea9203d672c19b733fb2121c2","original_commit_id":"4078ac85e585412ea9203d672c19b733fb2121c2","user":{"login":"sjschmidt44","id":8696424,"avatar_url":"https://avatars.githubusercontent.com/u/8696424?v=3","gravatar_id":"","url":"https://api.github.com/users/sjschmidt44","html_url":"https://github.com/sjschmidt44","followers_url":"https://api.github.com/users/sjschmidt44/followers","following_url":"https://api.github.com/users/sjschmidt44/following{/other_user}","gists_url":"https://api.github.com/users/sjschmidt44/gists{/gist_id}","starred_url":"https://api.github.com/users/sjschmidt44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjschmidt44/subscriptions","organizations_url":"https://api.github.com/users/sjschmidt44/orgs","repos_url":"https://api.github.com/users/sjschmidt44/repos","events_url":"https://api.github.com/users/sjschmidt44/events{/privacy}","received_events_url":"https://api.github.com/users/sjschmidt44/received_events","type":"User","site_admin":false},"body":"Nice work!","created_at":"2016-12-18T20:08:39Z","updated_at":"2016-12-18T20:08:39Z","html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6#discussion_r92949448","pull_request_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/comments/92949448"},"html":{"href":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6#discussion_r92949448"},"pull_request":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6","id":97493205,"html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6","diff_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6.diff","patch_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6.patch","issue_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/6","number":6,"state":"open","locked":false,"title":"Lab8","user":{"login":"cejac","id":13214336,"avatar_url":"https://avatars.githubusercontent.com/u/13214336?v=3","gravatar_id":"","url":"https://api.github.com/users/cejac","html_url":"https://github.com/cejac","followers_url":"https://api.github.com/users/cejac/followers","following_url":"https://api.github.com/users/cejac/following{/other_user}","gists_url":"https://api.github.com/users/cejac/gists{/gist_id}","starred_url":"https://api.github.com/users/cejac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cejac/subscriptions","organizations_url":"https://api.github.com/users/cejac/orgs","repos_url":"https://api.github.com/users/cejac/repos","events_url":"https://api.github.com/users/cejac/events{/privacy}","received_events_url":"https://api.github.com/users/cejac/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-12T04:26:58Z","updated_at":"2016-12-18T20:12:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c4bc89d6d7ee90278371e1834939b6804ecb8e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6/commits","review_comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6/comments","review_comment_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/6/comments","statuses_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/statuses/4078ac85e585412ea9203d672c19b733fb2121c2","head":{"label":"cejac:lab8","ref":"lab8","sha":"4078ac85e585412ea9203d672c19b733fb2121c2","user":{"login":"cejac","id":13214336,"avatar_url":"https://avatars.githubusercontent.com/u/13214336?v=3","gravatar_id":"","url":"https://api.github.com/users/cejac","html_url":"https://github.com/cejac","followers_url":"https://api.github.com/users/cejac/followers","following_url":"https://api.github.com/users/cejac/following{/other_user}","gists_url":"https://api.github.com/users/cejac/gists{/gist_id}","starred_url":"https://api.github.com/users/cejac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cejac/subscriptions","organizations_url":"https://api.github.com/users/cejac/orgs","repos_url":"https://api.github.com/users/cejac/repos","events_url":"https://api.github.com/users/cejac/events{/privacy}","received_events_url":"https://api.github.com/users/cejac/received_events","type":"User","site_admin":false},"repo":{"id":75978690,"name":"lab-08-single-resource-api","full_name":"cejac/lab-08-single-resource-api","owner":{"login":"cejac","id":13214336,"avatar_url":"https://avatars.githubusercontent.com/u/13214336?v=3","gravatar_id":"","url":"https://api.github.com/users/cejac","html_url":"https://github.com/cejac","followers_url":"https://api.github.com/users/cejac/followers","following_url":"https://api.github.com/users/cejac/following{/other_user}","gists_url":"https://api.github.com/users/cejac/gists{/gist_id}","starred_url":"https://api.github.com/users/cejac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cejac/subscriptions","organizations_url":"https://api.github.com/users/cejac/orgs","repos_url":"https://api.github.com/users/cejac/repos","events_url":"https://api.github.com/users/cejac/events{/privacy}","received_events_url":"https://api.github.com/users/cejac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cejac/lab-08-single-resource-api","description":null,"fork":true,"url":"https://api.github.com/repos/cejac/lab-08-single-resource-api","forks_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/forks","keys_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/teams","hooks_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/hooks","issue_events_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/issues/events{/number}","events_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/events","assignees_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/assignees{/user}","branches_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/branches{/branch}","tags_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/tags","blobs_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/statuses/{sha}","languages_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/languages","stargazers_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/stargazers","contributors_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/contributors","subscribers_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/subscribers","subscription_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/subscription","commits_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/contents/{+path}","compare_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/merges","archive_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/downloads","issues_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/issues{/number}","pulls_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/pulls{/number}","milestones_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/milestones{/number}","notifications_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/labels{/name}","releases_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/releases{/id}","deployments_url":"https://api.github.com/repos/cejac/lab-08-single-resource-api/deployments","created_at":"2016-12-08T21:59:55Z","updated_at":"2016-12-08T21:59:56Z","pushed_at":"2016-12-13T06:18:59Z","git_url":"git://github.com/cejac/lab-08-single-resource-api.git","ssh_url":"git@github.com:cejac/lab-08-single-resource-api.git","clone_url":"https://github.com/cejac/lab-08-single-resource-api.git","svn_url":"https://github.com/cejac/lab-08-single-resource-api","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Shell","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-seattle-javascript-401n3:master","ref":"master","sha":"2c9167d11fcf9db4cecfd5f9cf914cb7fea3a705","user":{"login":"codefellows-seattle-javascript-401n3","id":23367489,"avatar_url":"https://avatars.githubusercontent.com/u/23367489?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-seattle-javascript-401n3","html_url":"https://github.com/codefellows-seattle-javascript-401n3","followers_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/followers","following_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/subscriptions","organizations_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/orgs","repos_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/repos","events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/received_events","type":"Organization","site_admin":false},"repo":{"id":73342518,"name":"lab-08-single-resource-api","full_name":"codefellows-seattle-javascript-401n3/lab-08-single-resource-api","owner":{"login":"codefellows-seattle-javascript-401n3","id":23367489,"avatar_url":"https://avatars.githubusercontent.com/u/23367489?v=3","gravatar_id":"","url":"https://api.github.com/users/codefellows-seattle-javascript-401n3","html_url":"https://github.com/codefellows-seattle-javascript-401n3","followers_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/followers","following_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/following{/other_user}","gists_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/gists{/gist_id}","starred_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/subscriptions","organizations_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/orgs","repos_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/repos","events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/events{/privacy}","received_events_url":"https://api.github.com/users/codefellows-seattle-javascript-401n3/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api","description":null,"fork":false,"url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api","forks_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/forks","keys_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/teams","hooks_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/hooks","issue_events_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/events{/number}","events_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/events","assignees_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/assignees{/user}","branches_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/branches{/branch}","tags_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/tags","blobs_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/statuses/{sha}","languages_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/languages","stargazers_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/stargazers","contributors_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/contributors","subscribers_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/subscribers","subscription_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/subscription","commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/contents/{+path}","compare_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/merges","archive_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/downloads","issues_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues{/number}","pulls_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls{/number}","milestones_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/milestones{/number}","notifications_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/labels{/name}","releases_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/releases{/id}","deployments_url":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/deployments","created_at":"2016-11-10T03:08:38Z","updated_at":"2016-12-18T20:02:03Z","pushed_at":"2016-12-18T20:01:59Z","git_url":"git://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api.git","ssh_url":"git@github.com:codefellows-seattle-javascript-401n3/lab-08-single-resource-api.git","clone_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api.git","svn_url":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":17,"forks":11,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6"},"html":{"href":"https://github.com/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pull/6"},"issue":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/6"},"comments":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/codefellows-seattle-javascript-401n3/lab-08-single-resource-api/statuses/4078ac85e585412ea9203d672c19b733fb2121c2"}}}}
{"actor":{"display_login":"sjschmidt44"}}