{"action":"created","comment":{"url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/comments/180900703","pull_request_review_id":111405780,"id":180900703,"diff_hunk":"@@ -11,23 +11,30 @@ module.exports = {\n     return result;\n   },\n \n-  getListOfBranchesFilteredByCategory: categoryName =>\n-    Categories.query().skipUndefined()\n-      .where('cat_name', categoryName)\n-      .map(data => Service.query().findById(data.service_id))\n-      .map(data => Branch.query()\n-        .eager('[address, address.[location] service, service.[categories]]')\n-        .where('id', data.branch_id)),\n+  getBranchByCategory: async categoryName => {\n+    const result = await Organisation\n+      .query()\n+      .eagerAlgorithm(Organisation.JoinEagerAlgorithm)\n+      .eager('[branch, branch.[address, address.[location] service, service.[categories]] ]')\n+      .where('branch:service:categories.cat_name', 'like', `%${categoryName}%`)\n+    return result;\n+  },","path":"backend/src/controllers/get_controller.js","position":25,"original_position":18,"commit_id":"9e13d3efec887563e112dc62cff3a031a210e8cf","original_commit_id":"9e13d3efec887563e112dc62cff3a031a210e8cf","user":{"login":"DwinaTech","id":26422326,"avatar_url":"https://avatars3.githubusercontent.com/u/26422326?v=4","gravatar_id":"","url":"https://api.github.com/users/DwinaTech","html_url":"https://github.com/DwinaTech","followers_url":"https://api.github.com/users/DwinaTech/followers","following_url":"https://api.github.com/users/DwinaTech/following{/other_user}","gists_url":"https://api.github.com/users/DwinaTech/gists{/gist_id}","starred_url":"https://api.github.com/users/DwinaTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DwinaTech/subscriptions","organizations_url":"https://api.github.com/users/DwinaTech/orgs","repos_url":"https://api.github.com/users/DwinaTech/repos","events_url":"https://api.github.com/users/DwinaTech/events{/privacy}","received_events_url":"https://api.github.com/users/DwinaTech/received_events","type":"User","site_admin":false},"body":"Done\r\n","created_at":"2018-04-11T21:15:25Z","updated_at":"2018-04-11T21:15:25Z","html_url":"https://github.com/CodeYourFuture/directory-of-services/pull/69#discussion_r180900703","pull_request_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/comments/180900703"},"html":{"href":"https://github.com/CodeYourFuture/directory-of-services/pull/69#discussion_r180900703"},"pull_request":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69"}},"in_reply_to_id":180893401},"pull_request":{"url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69","id":180351706,"html_url":"https://github.com/CodeYourFuture/directory-of-services/pull/69","diff_url":"https://github.com/CodeYourFuture/directory-of-services/pull/69.diff","patch_url":"https://github.com/CodeYourFuture/directory-of-services/pull/69.patch","issue_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/69","number":69,"state":"open","locked":false,"title":"filtered list of branches by category name, day and borough","user":{"login":"DwinaTech","id":26422326,"avatar_url":"https://avatars3.githubusercontent.com/u/26422326?v=4","gravatar_id":"","url":"https://api.github.com/users/DwinaTech","html_url":"https://github.com/DwinaTech","followers_url":"https://api.github.com/users/DwinaTech/followers","following_url":"https://api.github.com/users/DwinaTech/following{/other_user}","gists_url":"https://api.github.com/users/DwinaTech/gists{/gist_id}","starred_url":"https://api.github.com/users/DwinaTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DwinaTech/subscriptions","organizations_url":"https://api.github.com/users/DwinaTech/orgs","repos_url":"https://api.github.com/users/DwinaTech/repos","events_url":"https://api.github.com/users/DwinaTech/events{/privacy}","received_events_url":"https://api.github.com/users/DwinaTech/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-09T15:50:19Z","updated_at":"2018-04-11T21:15:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"741ed3029091d93634c3c57839b7b030a9148158","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69/commits","review_comments_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69/comments","review_comment_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/69/comments","statuses_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/statuses/9e13d3efec887563e112dc62cff3a031a210e8cf","head":{"label":"DwinaTech:createdListOfBranchFilteredByDifferentServices","ref":"createdListOfBranchFilteredByDifferentServices","sha":"9e13d3efec887563e112dc62cff3a031a210e8cf","user":{"login":"DwinaTech","id":26422326,"avatar_url":"https://avatars3.githubusercontent.com/u/26422326?v=4","gravatar_id":"","url":"https://api.github.com/users/DwinaTech","html_url":"https://github.com/DwinaTech","followers_url":"https://api.github.com/users/DwinaTech/followers","following_url":"https://api.github.com/users/DwinaTech/following{/other_user}","gists_url":"https://api.github.com/users/DwinaTech/gists{/gist_id}","starred_url":"https://api.github.com/users/DwinaTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DwinaTech/subscriptions","organizations_url":"https://api.github.com/users/DwinaTech/orgs","repos_url":"https://api.github.com/users/DwinaTech/repos","events_url":"https://api.github.com/users/DwinaTech/events{/privacy}","received_events_url":"https://api.github.com/users/DwinaTech/received_events","type":"User","site_admin":false},"repo":{"id":120221194,"name":"directory-of-services","full_name":"DwinaTech/directory-of-services","owner":{"login":"DwinaTech","id":26422326,"avatar_url":"https://avatars3.githubusercontent.com/u/26422326?v=4","gravatar_id":"","url":"https://api.github.com/users/DwinaTech","html_url":"https://github.com/DwinaTech","followers_url":"https://api.github.com/users/DwinaTech/followers","following_url":"https://api.github.com/users/DwinaTech/following{/other_user}","gists_url":"https://api.github.com/users/DwinaTech/gists{/gist_id}","starred_url":"https://api.github.com/users/DwinaTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DwinaTech/subscriptions","organizations_url":"https://api.github.com/users/DwinaTech/orgs","repos_url":"https://api.github.com/users/DwinaTech/repos","events_url":"https://api.github.com/users/DwinaTech/events{/privacy}","received_events_url":"https://api.github.com/users/DwinaTech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DwinaTech/directory-of-services","description":"Directory of Services","fork":true,"url":"https://api.github.com/repos/DwinaTech/directory-of-services","forks_url":"https://api.github.com/repos/DwinaTech/directory-of-services/forks","keys_url":"https://api.github.com/repos/DwinaTech/directory-of-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DwinaTech/directory-of-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DwinaTech/directory-of-services/teams","hooks_url":"https://api.github.com/repos/DwinaTech/directory-of-services/hooks","issue_events_url":"https://api.github.com/repos/DwinaTech/directory-of-services/issues/events{/number}","events_url":"https://api.github.com/repos/DwinaTech/directory-of-services/events","assignees_url":"https://api.github.com/repos/DwinaTech/directory-of-services/assignees{/user}","branches_url":"https://api.github.com/repos/DwinaTech/directory-of-services/branches{/branch}","tags_url":"https://api.github.com/repos/DwinaTech/directory-of-services/tags","blobs_url":"https://api.github.com/repos/DwinaTech/directory-of-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DwinaTech/directory-of-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DwinaTech/directory-of-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/DwinaTech/directory-of-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DwinaTech/directory-of-services/statuses/{sha}","languages_url":"https://api.github.com/repos/DwinaTech/directory-of-services/languages","stargazers_url":"https://api.github.com/repos/DwinaTech/directory-of-services/stargazers","contributors_url":"https://api.github.com/repos/DwinaTech/directory-of-services/contributors","subscribers_url":"https://api.github.com/repos/DwinaTech/directory-of-services/subscribers","subscription_url":"https://api.github.com/repos/DwinaTech/directory-of-services/subscription","commits_url":"https://api.github.com/repos/DwinaTech/directory-of-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/DwinaTech/directory-of-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/DwinaTech/directory-of-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/DwinaTech/directory-of-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/DwinaTech/directory-of-services/contents/{+path}","compare_url":"https://api.github.com/repos/DwinaTech/directory-of-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DwinaTech/directory-of-services/merges","archive_url":"https://api.github.com/repos/DwinaTech/directory-of-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DwinaTech/directory-of-services/downloads","issues_url":"https://api.github.com/repos/DwinaTech/directory-of-services/issues{/number}","pulls_url":"https://api.github.com/repos/DwinaTech/directory-of-services/pulls{/number}","milestones_url":"https://api.github.com/repos/DwinaTech/directory-of-services/milestones{/number}","notifications_url":"https://api.github.com/repos/DwinaTech/directory-of-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DwinaTech/directory-of-services/labels{/name}","releases_url":"https://api.github.com/repos/DwinaTech/directory-of-services/releases{/id}","deployments_url":"https://api.github.com/repos/DwinaTech/directory-of-services/deployments","created_at":"2018-02-04T20:39:02Z","updated_at":"2018-01-30T17:19:52Z","pushed_at":"2018-04-11T21:15:20Z","git_url":"git://github.com/DwinaTech/directory-of-services.git","ssh_url":"git@github.com:DwinaTech/directory-of-services.git","clone_url":"https://github.com/DwinaTech/directory-of-services.git","svn_url":"https://github.com/DwinaTech/directory-of-services","homepage":null,"size":1749,"stargazers_count":0,"watchers_count":0,"language":null,"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":"CodeYourFuture:master","ref":"master","sha":"e12caa1e932bb053100b4db2bbca223f54db2bae","user":{"login":"CodeYourFuture","id":22743767,"avatar_url":"https://avatars3.githubusercontent.com/u/22743767?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeYourFuture","html_url":"https://github.com/CodeYourFuture","followers_url":"https://api.github.com/users/CodeYourFuture/followers","following_url":"https://api.github.com/users/CodeYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/CodeYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeYourFuture/subscriptions","organizations_url":"https://api.github.com/users/CodeYourFuture/orgs","repos_url":"https://api.github.com/users/CodeYourFuture/repos","events_url":"https://api.github.com/users/CodeYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/CodeYourFuture/received_events","type":"Organization","site_admin":false},"repo":{"id":119569031,"name":"directory-of-services","full_name":"CodeYourFuture/directory-of-services","owner":{"login":"CodeYourFuture","id":22743767,"avatar_url":"https://avatars3.githubusercontent.com/u/22743767?v=4","gravatar_id":"","url":"https://api.github.com/users/CodeYourFuture","html_url":"https://github.com/CodeYourFuture","followers_url":"https://api.github.com/users/CodeYourFuture/followers","following_url":"https://api.github.com/users/CodeYourFuture/following{/other_user}","gists_url":"https://api.github.com/users/CodeYourFuture/gists{/gist_id}","starred_url":"https://api.github.com/users/CodeYourFuture/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CodeYourFuture/subscriptions","organizations_url":"https://api.github.com/users/CodeYourFuture/orgs","repos_url":"https://api.github.com/users/CodeYourFuture/repos","events_url":"https://api.github.com/users/CodeYourFuture/events{/privacy}","received_events_url":"https://api.github.com/users/CodeYourFuture/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CodeYourFuture/directory-of-services","description":"Directory of Services","fork":false,"url":"https://api.github.com/repos/CodeYourFuture/directory-of-services","forks_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/forks","keys_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/teams","hooks_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/hooks","issue_events_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/events{/number}","events_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/events","assignees_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/assignees{/user}","branches_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/branches{/branch}","tags_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/tags","blobs_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/statuses/{sha}","languages_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/languages","stargazers_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/stargazers","contributors_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/contributors","subscribers_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/subscribers","subscription_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/subscription","commits_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/contents/{+path}","compare_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/merges","archive_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/downloads","issues_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues{/number}","pulls_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls{/number}","milestones_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/milestones{/number}","notifications_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/labels{/name}","releases_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/releases{/id}","deployments_url":"https://api.github.com/repos/CodeYourFuture/directory-of-services/deployments","created_at":"2018-01-30T17:19:52Z","updated_at":"2018-04-11T20:42:39Z","pushed_at":"2018-04-11T21:15:21Z","git_url":"git://github.com/CodeYourFuture/directory-of-services.git","ssh_url":"git@github.com:CodeYourFuture/directory-of-services.git","clone_url":"https://github.com/CodeYourFuture/directory-of-services.git","svn_url":"https://github.com/CodeYourFuture/directory-of-services","homepage":null,"size":1692,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69"},"html":{"href":"https://github.com/CodeYourFuture/directory-of-services/pull/69"},"issue":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/69"},"comments":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/CodeYourFuture/directory-of-services/statuses/9e13d3efec887563e112dc62cff3a031a210e8cf"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"DwinaTech"}}