{"action":"created","comment":{"url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments/205949731","pull_request_review_id":141323464,"id":205949731,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTk0OTczMQ==","diff_hunk":"@@ -1,3 +1,97 @@\n 'use strict';\n \n // TODO: Write the homework code in this file\n+\n+const Express = require('express');\n+const {\n+  // TODO: implement the following actions:\n+  createToDo,\n+  deleteToDo,\n+  resetToDos,\n+  readToDos,\n+  updateToDo,\n+  markAsDoneNotDone\n+} = require('./actions');\n+\n+const PORT = 3000;\n+\n+const app = Express();\n+\n+// request body parser\n+app.use(Express.json());\n+\n+// TODO: implement readTodo, clearTodos, markAsDone and markAsNotDone routes and actions\n+\n+// readTodos\n+app.get('/todos', (req, res, next) => {\n+  readToDos()\n+    .then(toDoList => res.send(toDoList))\n+    .catch(err => next(err));\n+});\n+\n+// createTodo\n+app.post('/todos', (req, res, next) => {\n+  const { todo } = req.body;\n+\n+  createToDo(todo)\n+    .then(readToDos)\n+    .then(toDoList => res.send(toDoList))\n+    .catch(err => next(err));\n+});\n+\n+// updateTodo\n+app.put('/todos/:id', (req, res, next) => {\n+  const { id } = req.params;\n+  const newToDo = req.body;\n+\n+  updateToDo(id, newToDo)\n+    .then(readToDos)\n+    .then(toDoList => res.send(toDoList))\n+    .catch(err => next(err));\n+});\n+\n+// clearTodo\n+app.delete('/todos/:id', (req, res, next) => {\n+  const { id } = req.params;\n+  deleteToDo(id)\n+    .then(readToDos)\n+    .then(toDoList => res.send(toDoList))\n+    .catch(err => next(err));\n+});\n+\n+// resetTodos\n+app.delete('/reset', (req, res, next) => {","path":"week3/homework/src/index.js","position":63,"original_position":63,"commit_id":"e73ba76f77e813f44086a88304806c93dc685673","original_commit_id":"e73ba76f77e813f44086a88304806c93dc685673","user":{"login":"GeorgeSapkin","id":5013206,"node_id":"MDQ6VXNlcjUwMTMyMDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5013206?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgeSapkin","html_url":"https://github.com/GeorgeSapkin","followers_url":"https://api.github.com/users/GeorgeSapkin/followers","following_url":"https://api.github.com/users/GeorgeSapkin/following{/other_user}","gists_url":"https://api.github.com/users/GeorgeSapkin/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgeSapkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgeSapkin/subscriptions","organizations_url":"https://api.github.com/users/GeorgeSapkin/orgs","repos_url":"https://api.github.com/users/GeorgeSapkin/repos","events_url":"https://api.github.com/users/GeorgeSapkin/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgeSapkin/received_events","type":"User","site_admin":false},"body":"I think you've meant this to be `/todos` instead of `/reset`.","created_at":"2018-07-28T18:01:54Z","updated_at":"2018-07-28T18:02:24Z","html_url":"https://github.com/HackYourFuture/Node.js/pull/209#discussion_r205949731","pull_request_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments/205949731"},"html":{"href":"https://github.com/HackYourFuture/Node.js/pull/209#discussion_r205949731"},"pull_request":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209"}}},"pull_request":{"url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209","id":201159250,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMTU5MjUw","html_url":"https://github.com/HackYourFuture/Node.js/pull/209","diff_url":"https://github.com/HackYourFuture/Node.js/pull/209.diff","patch_url":"https://github.com/HackYourFuture/Node.js/pull/209.patch","issue_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/209","number":209,"state":"open","locked":false,"title":"Added homework now it is tested","user":{"login":"neveenatik","id":36904389,"node_id":"MDQ6VXNlcjM2OTA0Mzg5","avatar_url":"https://avatars2.githubusercontent.com/u/36904389?v=4","gravatar_id":"","url":"https://api.github.com/users/neveenatik","html_url":"https://github.com/neveenatik","followers_url":"https://api.github.com/users/neveenatik/followers","following_url":"https://api.github.com/users/neveenatik/following{/other_user}","gists_url":"https://api.github.com/users/neveenatik/gists{/gist_id}","starred_url":"https://api.github.com/users/neveenatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neveenatik/subscriptions","organizations_url":"https://api.github.com/users/neveenatik/orgs","repos_url":"https://api.github.com/users/neveenatik/repos","events_url":"https://api.github.com/users/neveenatik/events{/privacy}","received_events_url":"https://api.github.com/users/neveenatik/received_events","type":"User","site_admin":false},"body":"Hi George and Alex,\r\n\r\nHomework is not ready for review unfortunately. Very sorry about that. I got stuck but I will get there.\r\nThanks for your patience.","created_at":"2018-07-13T00:27:20Z","updated_at":"2018-07-28T18:02:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0453115002683c92953f3e799729b06b636bb06","assignee":null,"assignees":[],"requested_reviewers":[{"login":"alxbrg","id":12252073,"node_id":"MDQ6VXNlcjEyMjUyMDcz","avatar_url":"https://avatars1.githubusercontent.com/u/12252073?v=4","gravatar_id":"","url":"https://api.github.com/users/alxbrg","html_url":"https://github.com/alxbrg","followers_url":"https://api.github.com/users/alxbrg/followers","following_url":"https://api.github.com/users/alxbrg/following{/other_user}","gists_url":"https://api.github.com/users/alxbrg/gists{/gist_id}","starred_url":"https://api.github.com/users/alxbrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxbrg/subscriptions","organizations_url":"https://api.github.com/users/alxbrg/orgs","repos_url":"https://api.github.com/users/alxbrg/repos","events_url":"https://api.github.com/users/alxbrg/events{/privacy}","received_events_url":"https://api.github.com/users/alxbrg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":976785550,"node_id":"MDU6TGFiZWw5NzY3ODU1NTA=","url":"https://api.github.com/repos/HackYourFuture/Node.js/labels/class15","name":"class15","color":"8ccc3f","default":false},{"id":883891913,"node_id":"MDU6TGFiZWw4ODM4OTE5MTM=","url":"https://api.github.com/repos/HackYourFuture/Node.js/labels/homework3","name":"homework3","color":"0bead8","default":false},{"id":862630052,"node_id":"MDU6TGFiZWw4NjI2MzAwNTI=","url":"https://api.github.com/repos/HackYourFuture/Node.js/labels/to%20review","name":"to review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209/commits","review_comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209/comments","review_comment_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/209/comments","statuses_url":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/e73ba76f77e813f44086a88304806c93dc685673","head":{"label":"neveenatik:neveenatik-homework3","ref":"neveenatik-homework3","sha":"e73ba76f77e813f44086a88304806c93dc685673","user":{"login":"neveenatik","id":36904389,"node_id":"MDQ6VXNlcjM2OTA0Mzg5","avatar_url":"https://avatars2.githubusercontent.com/u/36904389?v=4","gravatar_id":"","url":"https://api.github.com/users/neveenatik","html_url":"https://github.com/neveenatik","followers_url":"https://api.github.com/users/neveenatik/followers","following_url":"https://api.github.com/users/neveenatik/following{/other_user}","gists_url":"https://api.github.com/users/neveenatik/gists{/gist_id}","starred_url":"https://api.github.com/users/neveenatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neveenatik/subscriptions","organizations_url":"https://api.github.com/users/neveenatik/orgs","repos_url":"https://api.github.com/users/neveenatik/repos","events_url":"https://api.github.com/users/neveenatik/events{/privacy}","received_events_url":"https://api.github.com/users/neveenatik/received_events","type":"User","site_admin":false},"repo":{"id":138484634,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0ODQ2MzQ=","name":"Node.js","full_name":"neveenatik/Node.js","owner":{"login":"neveenatik","id":36904389,"node_id":"MDQ6VXNlcjM2OTA0Mzg5","avatar_url":"https://avatars2.githubusercontent.com/u/36904389?v=4","gravatar_id":"","url":"https://api.github.com/users/neveenatik","html_url":"https://github.com/neveenatik","followers_url":"https://api.github.com/users/neveenatik/followers","following_url":"https://api.github.com/users/neveenatik/following{/other_user}","gists_url":"https://api.github.com/users/neveenatik/gists{/gist_id}","starred_url":"https://api.github.com/users/neveenatik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neveenatik/subscriptions","organizations_url":"https://api.github.com/users/neveenatik/orgs","repos_url":"https://api.github.com/users/neveenatik/repos","events_url":"https://api.github.com/users/neveenatik/events{/privacy}","received_events_url":"https://api.github.com/users/neveenatik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neveenatik/Node.js","description":"HackYourFuture - Node.js","fork":true,"url":"https://api.github.com/repos/neveenatik/Node.js","forks_url":"https://api.github.com/repos/neveenatik/Node.js/forks","keys_url":"https://api.github.com/repos/neveenatik/Node.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neveenatik/Node.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neveenatik/Node.js/teams","hooks_url":"https://api.github.com/repos/neveenatik/Node.js/hooks","issue_events_url":"https://api.github.com/repos/neveenatik/Node.js/issues/events{/number}","events_url":"https://api.github.com/repos/neveenatik/Node.js/events","assignees_url":"https://api.github.com/repos/neveenatik/Node.js/assignees{/user}","branches_url":"https://api.github.com/repos/neveenatik/Node.js/branches{/branch}","tags_url":"https://api.github.com/repos/neveenatik/Node.js/tags","blobs_url":"https://api.github.com/repos/neveenatik/Node.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neveenatik/Node.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neveenatik/Node.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/neveenatik/Node.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neveenatik/Node.js/statuses/{sha}","languages_url":"https://api.github.com/repos/neveenatik/Node.js/languages","stargazers_url":"https://api.github.com/repos/neveenatik/Node.js/stargazers","contributors_url":"https://api.github.com/repos/neveenatik/Node.js/contributors","subscribers_url":"https://api.github.com/repos/neveenatik/Node.js/subscribers","subscription_url":"https://api.github.com/repos/neveenatik/Node.js/subscription","commits_url":"https://api.github.com/repos/neveenatik/Node.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/neveenatik/Node.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/neveenatik/Node.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/neveenatik/Node.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/neveenatik/Node.js/contents/{+path}","compare_url":"https://api.github.com/repos/neveenatik/Node.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neveenatik/Node.js/merges","archive_url":"https://api.github.com/repos/neveenatik/Node.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neveenatik/Node.js/downloads","issues_url":"https://api.github.com/repos/neveenatik/Node.js/issues{/number}","pulls_url":"https://api.github.com/repos/neveenatik/Node.js/pulls{/number}","milestones_url":"https://api.github.com/repos/neveenatik/Node.js/milestones{/number}","notifications_url":"https://api.github.com/repos/neveenatik/Node.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neveenatik/Node.js/labels{/name}","releases_url":"https://api.github.com/repos/neveenatik/Node.js/releases{/id}","deployments_url":"https://api.github.com/repos/neveenatik/Node.js/deployments","created_at":"2018-06-24T13:34:45Z","updated_at":"2018-06-24T13:34:47Z","pushed_at":"2018-07-25T05:58:36Z","git_url":"git://github.com/neveenatik/Node.js.git","ssh_url":"git@github.com:neveenatik/Node.js.git","clone_url":"https://github.com/neveenatik/Node.js.git","svn_url":"https://github.com/neveenatik/Node.js","homepage":"","size":746,"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,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HackYourFuture:master","ref":"master","sha":"948e655329a5085fe693cc3e8e6c4505428dfd19","user":{"login":"HackYourFuture","id":20858568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODU4NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"repo":{"id":68906713,"node_id":"MDEwOlJlcG9zaXRvcnk2ODkwNjcxMw==","name":"Node.js","full_name":"HackYourFuture/Node.js","owner":{"login":"HackYourFuture","id":20858568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwODU4NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/20858568?v=4","gravatar_id":"","url":"https://api.github.com/users/HackYourFuture","html_url":"https://github.com/HackYourFuture","followers_url":"https://api.github.com/users/HackYourFuture/followers","following_url":"https://api.github.com/users/HackYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/HackYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/HackYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackYourFuture/subscriptions","organizations_url":"https://api.github.com/users/HackYourFuture/orgs","repos_url":"https://api.github.com/users/HackYourFuture/repos","events_url":"https://api.github.com/users/HackYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/HackYourFuture/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HackYourFuture/Node.js","description":"HackYourFuture - Node.js","fork":false,"url":"https://api.github.com/repos/HackYourFuture/Node.js","forks_url":"https://api.github.com/repos/HackYourFuture/Node.js/forks","keys_url":"https://api.github.com/repos/HackYourFuture/Node.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackYourFuture/Node.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackYourFuture/Node.js/teams","hooks_url":"https://api.github.com/repos/HackYourFuture/Node.js/hooks","issue_events_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/events{/number}","events_url":"https://api.github.com/repos/HackYourFuture/Node.js/events","assignees_url":"https://api.github.com/repos/HackYourFuture/Node.js/assignees{/user}","branches_url":"https://api.github.com/repos/HackYourFuture/Node.js/branches{/branch}","tags_url":"https://api.github.com/repos/HackYourFuture/Node.js/tags","blobs_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/{sha}","languages_url":"https://api.github.com/repos/HackYourFuture/Node.js/languages","stargazers_url":"https://api.github.com/repos/HackYourFuture/Node.js/stargazers","contributors_url":"https://api.github.com/repos/HackYourFuture/Node.js/contributors","subscribers_url":"https://api.github.com/repos/HackYourFuture/Node.js/subscribers","subscription_url":"https://api.github.com/repos/HackYourFuture/Node.js/subscription","commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackYourFuture/Node.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackYourFuture/Node.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackYourFuture/Node.js/contents/{+path}","compare_url":"https://api.github.com/repos/HackYourFuture/Node.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackYourFuture/Node.js/merges","archive_url":"https://api.github.com/repos/HackYourFuture/Node.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackYourFuture/Node.js/downloads","issues_url":"https://api.github.com/repos/HackYourFuture/Node.js/issues{/number}","pulls_url":"https://api.github.com/repos/HackYourFuture/Node.js/pulls{/number}","milestones_url":"https://api.github.com/repos/HackYourFuture/Node.js/milestones{/number}","notifications_url":"https://api.github.com/repos/HackYourFuture/Node.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackYourFuture/Node.js/labels{/name}","releases_url":"https://api.github.com/repos/HackYourFuture/Node.js/releases{/id}","deployments_url":"https://api.github.com/repos/HackYourFuture/Node.js/deployments","created_at":"2016-09-22T09:36:44Z","updated_at":"2018-06-22T10:15:58Z","pushed_at":"2018-07-28T17:13:45Z","git_url":"git://github.com/HackYourFuture/Node.js.git","ssh_url":"git@github.com:HackYourFuture/Node.js.git","clone_url":"https://github.com/HackYourFuture/Node.js.git","svn_url":"https://github.com/HackYourFuture/Node.js","homepage":"","size":695,"stargazers_count":26,"watchers_count":26,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":118,"open_issues":12,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209"},"html":{"href":"https://github.com/HackYourFuture/Node.js/pull/209"},"issue":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/issues/209"},"comments":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/HackYourFuture/Node.js/statuses/e73ba76f77e813f44086a88304806c93dc685673"}},"author_association":"NONE"}}
{"actor":{"display_login":"GeorgeSapkin"}}