{"action":"created","comment":{"url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/comments/215416349","pull_request_review_id":152660640,"id":215416349,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTQxNjM0OQ==","diff_hunk":"@@ -0,0 +1,57 @@\n+const db = require('../models');\n+\n+function list(req, res) {\n+  return db.team.findAll()\n+    .then(teams => res.send(teams));\n+}\n+\n+function create({ body }, res) {\n+  return db.team.create(body).then(user => res.send(user));\n+}\n+\n+function getTeamUsers({ params: { teamId } }, res) {\n+  return db.user.findAll({\n+    where: { teamId },\n+    attributes: ['id', 'firstName', 'lastName'],\n+    include: [{\n+      model: db.office,\n+      attributes: ['name']\n+    }]\n+  })\n+    .then(users => res.send(users));\n+}\n+\n+function getTeam({ params: { id } }, res) {\n+  return db.team.findOne({\n+    where: { id }\n+  })\n+    .then(team => res.send(team));\n+}\n+\n+function remove({ params: { id } }, res) {\n+  return db.team.destroy({\n+    where: { id }\n+  })\n+    .then(() => res.status(204).send())","path":"server/controllers/team.js","position":35,"original_position":35,"commit_id":"1495896a8a2683742758e43fe70637ffa430b611","original_commit_id":"1495896a8a2683742758e43fe70637ffa430b611","user":{"login":"abasic","id":6884698,"node_id":"MDQ6VXNlcjY4ODQ2OTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6884698?v=4","gravatar_id":"","url":"https://api.github.com/users/abasic","html_url":"https://github.com/abasic","followers_url":"https://api.github.com/users/abasic/followers","following_url":"https://api.github.com/users/abasic/following{/other_user}","gists_url":"https://api.github.com/users/abasic/gists{/gist_id}","starred_url":"https://api.github.com/users/abasic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abasic/subscriptions","organizations_url":"https://api.github.com/users/abasic/orgs","repos_url":"https://api.github.com/users/abasic/repos","events_url":"https://api.github.com/users/abasic/events{/privacy}","received_events_url":"https://api.github.com/users/abasic/received_events","type":"User","site_admin":false},"body":"Why do you send twice?","created_at":"2018-09-05T20:33:53Z","updated_at":"2018-09-05T20:36:46Z","html_url":"https://github.com/skeja/Team-Leader-Reports/pull/9#discussion_r215416349","pull_request_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/comments/215416349"},"html":{"href":"https://github.com/skeja/Team-Leader-Reports/pull/9#discussion_r215416349"},"pull_request":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9","id":201905889,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxOTA1ODg5","html_url":"https://github.com/skeja/Team-Leader-Reports/pull/9","diff_url":"https://github.com/skeja/Team-Leader-Reports/pull/9.diff","patch_url":"https://github.com/skeja/Team-Leader-Reports/pull/9.patch","issue_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/9","number":9,"state":"open","locked":false,"title":"Feature/teams","user":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-17T11:12:38Z","updated_at":"2018-09-05T20:36:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54600cfdd3e92aa4a2e281382c877a091aa21403","assignee":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"assignees":[{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9/commits","review_comments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9/comments","review_comment_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/comments{/number}","comments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/9/comments","statuses_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/statuses/1495896a8a2683742758e43fe70637ffa430b611","head":{"label":"skeja:feature/teams","ref":"feature/teams","sha":"1495896a8a2683742758e43fe70637ffa430b611","user":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"repo":{"id":132881090,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI4ODEwOTA=","name":"Team-Leader-Reports","full_name":"skeja/Team-Leader-Reports","owner":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skeja/Team-Leader-Reports","description":null,"fork":false,"url":"https://api.github.com/repos/skeja/Team-Leader-Reports","forks_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/forks","keys_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/teams","hooks_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/hooks","issue_events_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/events{/number}","events_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/events","assignees_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/assignees{/user}","branches_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/branches{/branch}","tags_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/tags","blobs_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/statuses/{sha}","languages_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/languages","stargazers_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/stargazers","contributors_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/contributors","subscribers_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/subscribers","subscription_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/subscription","commits_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/contents/{+path}","compare_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/merges","archive_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/downloads","issues_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues{/number}","pulls_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls{/number}","milestones_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/milestones{/number}","notifications_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/labels{/name}","releases_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/releases{/id}","deployments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/deployments","created_at":"2018-05-10T09:49:42Z","updated_at":"2018-05-21T09:32:20Z","pushed_at":"2018-09-05T11:48:19Z","git_url":"git://github.com/skeja/Team-Leader-Reports.git","ssh_url":"git@github.com:skeja/Team-Leader-Reports.git","clone_url":"https://github.com/skeja/Team-Leader-Reports.git","svn_url":"https://github.com/skeja/Team-Leader-Reports","homepage":null,"size":381,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"skeja:master","ref":"master","sha":"a773b1ac468c9d858b88214fcc40824928e4bf48","user":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"repo":{"id":132881090,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI4ODEwOTA=","name":"Team-Leader-Reports","full_name":"skeja/Team-Leader-Reports","owner":{"login":"skeja","id":25084276,"node_id":"MDQ6VXNlcjI1MDg0Mjc2","avatar_url":"https://avatars2.githubusercontent.com/u/25084276?v=4","gravatar_id":"","url":"https://api.github.com/users/skeja","html_url":"https://github.com/skeja","followers_url":"https://api.github.com/users/skeja/followers","following_url":"https://api.github.com/users/skeja/following{/other_user}","gists_url":"https://api.github.com/users/skeja/gists{/gist_id}","starred_url":"https://api.github.com/users/skeja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skeja/subscriptions","organizations_url":"https://api.github.com/users/skeja/orgs","repos_url":"https://api.github.com/users/skeja/repos","events_url":"https://api.github.com/users/skeja/events{/privacy}","received_events_url":"https://api.github.com/users/skeja/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skeja/Team-Leader-Reports","description":null,"fork":false,"url":"https://api.github.com/repos/skeja/Team-Leader-Reports","forks_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/forks","keys_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/teams","hooks_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/hooks","issue_events_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/events{/number}","events_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/events","assignees_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/assignees{/user}","branches_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/branches{/branch}","tags_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/tags","blobs_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/statuses/{sha}","languages_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/languages","stargazers_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/stargazers","contributors_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/contributors","subscribers_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/subscribers","subscription_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/subscription","commits_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/contents/{+path}","compare_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/merges","archive_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/downloads","issues_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues{/number}","pulls_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls{/number}","milestones_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/milestones{/number}","notifications_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/labels{/name}","releases_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/releases{/id}","deployments_url":"https://api.github.com/repos/skeja/Team-Leader-Reports/deployments","created_at":"2018-05-10T09:49:42Z","updated_at":"2018-05-21T09:32:20Z","pushed_at":"2018-09-05T11:48:19Z","git_url":"git://github.com/skeja/Team-Leader-Reports.git","ssh_url":"git@github.com:skeja/Team-Leader-Reports.git","clone_url":"https://github.com/skeja/Team-Leader-Reports.git","svn_url":"https://github.com/skeja/Team-Leader-Reports","homepage":null,"size":381,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9"},"html":{"href":"https://github.com/skeja/Team-Leader-Reports/pull/9"},"issue":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/9"},"comments":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/skeja/Team-Leader-Reports/statuses/1495896a8a2683742758e43fe70637ffa430b611"}},"author_association":"OWNER"}}
{"actor":{"display_login":"abasic"}}