{"action":"created","comment":{"url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/comments/189244880","pull_request_review_id":121142608,"id":189244880,"diff_hunk":"@@ -0,0 +1,88 @@\n+'use strict'\n+const express = require('express')\n+\n+const router = express.Router()\n+const MongoClient = require('mongodb').MongoClient\n+\n+const MONGU_URI = process.env.MONGO\n+const TEAMS_COLLECTION = 'teams'\n+\n+router.get('/all', (req, res) => {\n+  MongoClient.connect(MONGU_URI).then(connection => {\n+    connection.db().collection(TEAMS_COLLECTION).find().toArray().then(data => {\n+      res.send(data)\n+    })\n+  }).catch(err => {\n+    // TODO: use ms-logger\n+    console.log(err)\n+    res.sendStatus(500)\n+  })\n+})\n+\n+router.get('/:id', (req, res) => {\n+  MongoClient.connect(MONGU_URI).then(connection => {\n+    connection.db().collection(TEAMS_COLLECTION).findOne({ 'number': parseInt(req.params.id) }).then(data => {\n+      if (!data) {\n+        res.sendStatus(404)\n+        return\n+      }\n+\n+      res.send(data)\n+    })\n+  }).catch(err => {\n+    // TODO: use ms-logger","path":"routers/teamsRouter.js","position":33,"original_position":33,"commit_id":"6042d21587eef534befcf3315850e00d901d5f92","original_commit_id":"6042d21587eef534befcf3315850e00d901d5f92","user":{"login":"idanstark42","id":19326938,"avatar_url":"https://avatars0.githubusercontent.com/u/19326938?v=4","gravatar_id":"","url":"https://api.github.com/users/idanstark42","html_url":"https://github.com/idanstark42","followers_url":"https://api.github.com/users/idanstark42/followers","following_url":"https://api.github.com/users/idanstark42/following{/other_user}","gists_url":"https://api.github.com/users/idanstark42/gists{/gist_id}","starred_url":"https://api.github.com/users/idanstark42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idanstark42/subscriptions","organizations_url":"https://api.github.com/users/idanstark42/orgs","repos_url":"https://api.github.com/users/idanstark42/repos","events_url":"https://api.github.com/users/idanstark42/events{/privacy}","received_events_url":"https://api.github.com/users/idanstark42/received_events","type":"User","site_admin":false},"body":"You already have ms-logger in your code","created_at":"2018-05-18T11:55:41Z","updated_at":"2018-05-18T11:57:56Z","html_url":"https://github.com/FirstLegoLeagueIL/schedule/pull/5#discussion_r189244880","pull_request_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/comments/189244880"},"html":{"href":"https://github.com/FirstLegoLeagueIL/schedule/pull/5#discussion_r189244880"},"pull_request":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5","id":188803685,"html_url":"https://github.com/FirstLegoLeagueIL/schedule/pull/5","diff_url":"https://github.com/FirstLegoLeagueIL/schedule/pull/5.diff","patch_url":"https://github.com/FirstLegoLeagueIL/schedule/pull/5.patch","issue_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/5","number":5,"state":"open","locked":false,"title":"File parsing teams crud","user":{"login":"taltaub22","id":1567714,"avatar_url":"https://avatars3.githubusercontent.com/u/1567714?v=4","gravatar_id":"","url":"https://api.github.com/users/taltaub22","html_url":"https://github.com/taltaub22","followers_url":"https://api.github.com/users/taltaub22/followers","following_url":"https://api.github.com/users/taltaub22/following{/other_user}","gists_url":"https://api.github.com/users/taltaub22/gists{/gist_id}","starred_url":"https://api.github.com/users/taltaub22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taltaub22/subscriptions","organizations_url":"https://api.github.com/users/taltaub22/orgs","repos_url":"https://api.github.com/users/taltaub22/repos","events_url":"https://api.github.com/users/taltaub22/events{/privacy}","received_events_url":"https://api.github.com/users/taltaub22/received_events","type":"User","site_admin":false},"body":"After making a mess from git,\r\nI've fixed almost everything..\r\nWaiting for your comments","created_at":"2018-05-17T17:08:14Z","updated_at":"2018-05-18T11:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56273bff56600a4db7cec2baabbd0ad1ebd52970","assignee":null,"assignees":[],"requested_reviewers":[{"login":"2roy999","id":2903801,"avatar_url":"https://avatars0.githubusercontent.com/u/2903801?v=4","gravatar_id":"","url":"https://api.github.com/users/2roy999","html_url":"https://github.com/2roy999","followers_url":"https://api.github.com/users/2roy999/followers","following_url":"https://api.github.com/users/2roy999/following{/other_user}","gists_url":"https://api.github.com/users/2roy999/gists{/gist_id}","starred_url":"https://api.github.com/users/2roy999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2roy999/subscriptions","organizations_url":"https://api.github.com/users/2roy999/orgs","repos_url":"https://api.github.com/users/2roy999/repos","events_url":"https://api.github.com/users/2roy999/events{/privacy}","received_events_url":"https://api.github.com/users/2roy999/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5/commits","review_comments_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5/comments","review_comment_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/5/comments","statuses_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/statuses/6042d21587eef534befcf3315850e00d901d5f92","head":{"label":"taltaub22:file-parsing-teams-crud","ref":"file-parsing-teams-crud","sha":"6042d21587eef534befcf3315850e00d901d5f92","user":{"login":"taltaub22","id":1567714,"avatar_url":"https://avatars3.githubusercontent.com/u/1567714?v=4","gravatar_id":"","url":"https://api.github.com/users/taltaub22","html_url":"https://github.com/taltaub22","followers_url":"https://api.github.com/users/taltaub22/followers","following_url":"https://api.github.com/users/taltaub22/following{/other_user}","gists_url":"https://api.github.com/users/taltaub22/gists{/gist_id}","starred_url":"https://api.github.com/users/taltaub22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taltaub22/subscriptions","organizations_url":"https://api.github.com/users/taltaub22/orgs","repos_url":"https://api.github.com/users/taltaub22/repos","events_url":"https://api.github.com/users/taltaub22/events{/privacy}","received_events_url":"https://api.github.com/users/taltaub22/received_events","type":"User","site_admin":false},"repo":{"id":128633650,"name":"schedule","full_name":"taltaub22/schedule","owner":{"login":"taltaub22","id":1567714,"avatar_url":"https://avatars3.githubusercontent.com/u/1567714?v=4","gravatar_id":"","url":"https://api.github.com/users/taltaub22","html_url":"https://github.com/taltaub22","followers_url":"https://api.github.com/users/taltaub22/followers","following_url":"https://api.github.com/users/taltaub22/following{/other_user}","gists_url":"https://api.github.com/users/taltaub22/gists{/gist_id}","starred_url":"https://api.github.com/users/taltaub22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taltaub22/subscriptions","organizations_url":"https://api.github.com/users/taltaub22/orgs","repos_url":"https://api.github.com/users/taltaub22/repos","events_url":"https://api.github.com/users/taltaub22/events{/privacy}","received_events_url":"https://api.github.com/users/taltaub22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taltaub22/schedule","description":null,"fork":true,"url":"https://api.github.com/repos/taltaub22/schedule","forks_url":"https://api.github.com/repos/taltaub22/schedule/forks","keys_url":"https://api.github.com/repos/taltaub22/schedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taltaub22/schedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taltaub22/schedule/teams","hooks_url":"https://api.github.com/repos/taltaub22/schedule/hooks","issue_events_url":"https://api.github.com/repos/taltaub22/schedule/issues/events{/number}","events_url":"https://api.github.com/repos/taltaub22/schedule/events","assignees_url":"https://api.github.com/repos/taltaub22/schedule/assignees{/user}","branches_url":"https://api.github.com/repos/taltaub22/schedule/branches{/branch}","tags_url":"https://api.github.com/repos/taltaub22/schedule/tags","blobs_url":"https://api.github.com/repos/taltaub22/schedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taltaub22/schedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taltaub22/schedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/taltaub22/schedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taltaub22/schedule/statuses/{sha}","languages_url":"https://api.github.com/repos/taltaub22/schedule/languages","stargazers_url":"https://api.github.com/repos/taltaub22/schedule/stargazers","contributors_url":"https://api.github.com/repos/taltaub22/schedule/contributors","subscribers_url":"https://api.github.com/repos/taltaub22/schedule/subscribers","subscription_url":"https://api.github.com/repos/taltaub22/schedule/subscription","commits_url":"https://api.github.com/repos/taltaub22/schedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/taltaub22/schedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/taltaub22/schedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/taltaub22/schedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/taltaub22/schedule/contents/{+path}","compare_url":"https://api.github.com/repos/taltaub22/schedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taltaub22/schedule/merges","archive_url":"https://api.github.com/repos/taltaub22/schedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taltaub22/schedule/downloads","issues_url":"https://api.github.com/repos/taltaub22/schedule/issues{/number}","pulls_url":"https://api.github.com/repos/taltaub22/schedule/pulls{/number}","milestones_url":"https://api.github.com/repos/taltaub22/schedule/milestones{/number}","notifications_url":"https://api.github.com/repos/taltaub22/schedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taltaub22/schedule/labels{/name}","releases_url":"https://api.github.com/repos/taltaub22/schedule/releases{/id}","deployments_url":"https://api.github.com/repos/taltaub22/schedule/deployments","created_at":"2018-04-08T11:23:08Z","updated_at":"2018-05-18T09:58:31Z","pushed_at":"2018-05-18T09:58:30Z","git_url":"git://github.com/taltaub22/schedule.git","ssh_url":"git@github.com:taltaub22/schedule.git","clone_url":"https://github.com/taltaub22/schedule.git","svn_url":"https://github.com/taltaub22/schedule","homepage":null,"size":50,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"FirstLegoLeagueIL:master","ref":"master","sha":"c9d1a435784262fdd81912f18095c72e359829a8","user":{"login":"FirstLegoLeagueIL","id":31323804,"avatar_url":"https://avatars1.githubusercontent.com/u/31323804?v=4","gravatar_id":"","url":"https://api.github.com/users/FirstLegoLeagueIL","html_url":"https://github.com/FirstLegoLeagueIL","followers_url":"https://api.github.com/users/FirstLegoLeagueIL/followers","following_url":"https://api.github.com/users/FirstLegoLeagueIL/following{/other_user}","gists_url":"https://api.github.com/users/FirstLegoLeagueIL/gists{/gist_id}","starred_url":"https://api.github.com/users/FirstLegoLeagueIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirstLegoLeagueIL/subscriptions","organizations_url":"https://api.github.com/users/FirstLegoLeagueIL/orgs","repos_url":"https://api.github.com/users/FirstLegoLeagueIL/repos","events_url":"https://api.github.com/users/FirstLegoLeagueIL/events{/privacy}","received_events_url":"https://api.github.com/users/FirstLegoLeagueIL/received_events","type":"Organization","site_admin":false},"repo":{"id":128631067,"name":"schedule","full_name":"FirstLegoLeagueIL/schedule","owner":{"login":"FirstLegoLeagueIL","id":31323804,"avatar_url":"https://avatars1.githubusercontent.com/u/31323804?v=4","gravatar_id":"","url":"https://api.github.com/users/FirstLegoLeagueIL","html_url":"https://github.com/FirstLegoLeagueIL","followers_url":"https://api.github.com/users/FirstLegoLeagueIL/followers","following_url":"https://api.github.com/users/FirstLegoLeagueIL/following{/other_user}","gists_url":"https://api.github.com/users/FirstLegoLeagueIL/gists{/gist_id}","starred_url":"https://api.github.com/users/FirstLegoLeagueIL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FirstLegoLeagueIL/subscriptions","organizations_url":"https://api.github.com/users/FirstLegoLeagueIL/orgs","repos_url":"https://api.github.com/users/FirstLegoLeagueIL/repos","events_url":"https://api.github.com/users/FirstLegoLeagueIL/events{/privacy}","received_events_url":"https://api.github.com/users/FirstLegoLeagueIL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FirstLegoLeagueIL/schedule","description":null,"fork":false,"url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule","forks_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/forks","keys_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/teams","hooks_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/hooks","issue_events_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/events{/number}","events_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/events","assignees_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/assignees{/user}","branches_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/branches{/branch}","tags_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/tags","blobs_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/git/refs{/sha}","trees_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/statuses/{sha}","languages_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/languages","stargazers_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/stargazers","contributors_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/contributors","subscribers_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/subscribers","subscription_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/subscription","commits_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/commits{/sha}","git_commits_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/git/commits{/sha}","comments_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/comments{/number}","issue_comment_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/comments{/number}","contents_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/contents/{+path}","compare_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/merges","archive_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/downloads","issues_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues{/number}","pulls_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls{/number}","milestones_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/milestones{/number}","notifications_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/labels{/name}","releases_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/releases{/id}","deployments_url":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/deployments","created_at":"2018-04-08T10:48:34Z","updated_at":"2018-04-08T11:00:25Z","pushed_at":"2018-05-17T17:21:05Z","git_url":"git://github.com/FirstLegoLeagueIL/schedule.git","ssh_url":"git@github.com:FirstLegoLeagueIL/schedule.git","clone_url":"https://github.com/FirstLegoLeagueIL/schedule.git","svn_url":"https://github.com/FirstLegoLeagueIL/schedule","homepage":null,"size":2,"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":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5"},"html":{"href":"https://github.com/FirstLegoLeagueIL/schedule/pull/5"},"issue":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/5"},"comments":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/FirstLegoLeagueIL/schedule/statuses/6042d21587eef534befcf3315850e00d901d5f92"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"idanstark42"}}