{"action":"created","comment":{"url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/comments/189429467","pull_request_review_id":121614008,"id":189429467,"diff_hunk":"@@ -0,0 +1,162 @@\n+import validator from 'validator';\n+\n+import { \n+  Centers, \n+  Events \n+} from '../models';\n+\n+/**\n+ * A class that allows all users get a centers\n+ * and then see all events slated for that event center\n+ * @export\n+ * @class GetCenter\n+ */\n+export class GetCenter {\n+  /**\n+   * @static\n+   * @param {any} req {request object}\n+   * @param {any} res {response object}\n+   * @return {*} JSON\n+   * @memberof GetCenter\n+   */\n+  static getCenter(req, res) {\n+    const { centerId } = req.params;\n+    let events;\n+    // let page =  math.ceil((parseInt(req.query.page, 10) - 1 ) * 10)\n+\n+    return Centers\n+      .findOne({\n+        where: {\n+          id: centerId,\n+        }\n+      })\n+      .then((center) => {\n+        if (!center) {\n+          return res.status(404).send({\n+            status: 'Unsuccessful',\n+            message: 'Center Not Found'\n+          });\n+        }\n+\n+        return Events\n+          .findAndCountAll({\n+            limit: 10,\n+            offset: Math.ceil((parseInt(req.query.page, 10) - 1 ) * 10),\n+            order: [['id', 'ASC']],\n+            where: {\n+              centerId\n+            }\n+          })\n+          .then((event) => {\n+            console.log('this the event', event)","path":"server/src/controllers/getCenters.js","position":51,"original_position":51,"commit_id":"7268b20d200121836ba7b5babdad4a0e71bef5ad","original_commit_id":"7268b20d200121836ba7b5babdad4a0e71bef5ad","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Unexpected console statement  no-console","created_at":"2018-05-19T09:02:40Z","updated_at":"2018-05-19T09:02:43Z","html_url":"https://github.com/iidrees/Events-Manager/pull/85#discussion_r189429467","pull_request_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/comments/189429467"},"html":{"href":"https://github.com/iidrees/Events-Manager/pull/85#discussion_r189429467"},"pull_request":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85"}}},"pull_request":{"url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85","id":189178989,"html_url":"https://github.com/iidrees/Events-Manager/pull/85","diff_url":"https://github.com/iidrees/Events-Manager/pull/85.diff","patch_url":"https://github.com/iidrees/Events-Manager/pull/85.patch","issue_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/85","number":85,"state":"open","locked":false,"title":"Code review","user":{"login":"iidrees","id":24682326,"avatar_url":"https://avatars1.githubusercontent.com/u/24682326?v=4","gravatar_id":"","url":"https://api.github.com/users/iidrees","html_url":"https://github.com/iidrees","followers_url":"https://api.github.com/users/iidrees/followers","following_url":"https://api.github.com/users/iidrees/following{/other_user}","gists_url":"https://api.github.com/users/iidrees/gists{/gist_id}","starred_url":"https://api.github.com/users/iidrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iidrees/subscriptions","organizations_url":"https://api.github.com/users/iidrees/orgs","repos_url":"https://api.github.com/users/iidrees/repos","events_url":"https://api.github.com/users/iidrees/events{/privacy}","received_events_url":"https://api.github.com/users/iidrees/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nFor code review\r\n#### Description of Task to be completed?\r\nImplement feedback received\r\n#### How should this be manually tested?\r\nN/A\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories?\r\nN/A\r\n#### Screenshots (if appropriate)\r\nN/A\r\n#### Questions:\r\nN/A","created_at":"2018-05-19T09:00:59Z","updated_at":"2018-05-19T09:02:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88434b165e60bb0591b1ec092bf6dbc51de26e2d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85/commits","review_comments_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85/comments","review_comment_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/85/comments","statuses_url":"https://api.github.com/repos/iidrees/Events-Manager/statuses/7268b20d200121836ba7b5babdad4a0e71bef5ad","head":{"label":"iidrees:chore/157640554/modularize-clean-codebase","ref":"chore/157640554/modularize-clean-codebase","sha":"7268b20d200121836ba7b5babdad4a0e71bef5ad","user":{"login":"iidrees","id":24682326,"avatar_url":"https://avatars1.githubusercontent.com/u/24682326?v=4","gravatar_id":"","url":"https://api.github.com/users/iidrees","html_url":"https://github.com/iidrees","followers_url":"https://api.github.com/users/iidrees/followers","following_url":"https://api.github.com/users/iidrees/following{/other_user}","gists_url":"https://api.github.com/users/iidrees/gists{/gist_id}","starred_url":"https://api.github.com/users/iidrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iidrees/subscriptions","organizations_url":"https://api.github.com/users/iidrees/orgs","repos_url":"https://api.github.com/users/iidrees/repos","events_url":"https://api.github.com/users/iidrees/events{/privacy}","received_events_url":"https://api.github.com/users/iidrees/received_events","type":"User","site_admin":false},"repo":{"id":110561880,"name":"Events-Manager","full_name":"iidrees/Events-Manager","owner":{"login":"iidrees","id":24682326,"avatar_url":"https://avatars1.githubusercontent.com/u/24682326?v=4","gravatar_id":"","url":"https://api.github.com/users/iidrees","html_url":"https://github.com/iidrees","followers_url":"https://api.github.com/users/iidrees/followers","following_url":"https://api.github.com/users/iidrees/following{/other_user}","gists_url":"https://api.github.com/users/iidrees/gists{/gist_id}","starred_url":"https://api.github.com/users/iidrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iidrees/subscriptions","organizations_url":"https://api.github.com/users/iidrees/orgs","repos_url":"https://api.github.com/users/iidrees/repos","events_url":"https://api.github.com/users/iidrees/events{/privacy}","received_events_url":"https://api.github.com/users/iidrees/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iidrees/Events-Manager","description":"An application that allows Event Centers owners provide centers to event planners who may be looking for a good event center to use for their events","fork":false,"url":"https://api.github.com/repos/iidrees/Events-Manager","forks_url":"https://api.github.com/repos/iidrees/Events-Manager/forks","keys_url":"https://api.github.com/repos/iidrees/Events-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iidrees/Events-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iidrees/Events-Manager/teams","hooks_url":"https://api.github.com/repos/iidrees/Events-Manager/hooks","issue_events_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/iidrees/Events-Manager/events","assignees_url":"https://api.github.com/repos/iidrees/Events-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/iidrees/Events-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/iidrees/Events-Manager/tags","blobs_url":"https://api.github.com/repos/iidrees/Events-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iidrees/Events-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iidrees/Events-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/iidrees/Events-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iidrees/Events-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/iidrees/Events-Manager/languages","stargazers_url":"https://api.github.com/repos/iidrees/Events-Manager/stargazers","contributors_url":"https://api.github.com/repos/iidrees/Events-Manager/contributors","subscribers_url":"https://api.github.com/repos/iidrees/Events-Manager/subscribers","subscription_url":"https://api.github.com/repos/iidrees/Events-Manager/subscription","commits_url":"https://api.github.com/repos/iidrees/Events-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/iidrees/Events-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/iidrees/Events-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/iidrees/Events-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/iidrees/Events-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iidrees/Events-Manager/merges","archive_url":"https://api.github.com/repos/iidrees/Events-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iidrees/Events-Manager/downloads","issues_url":"https://api.github.com/repos/iidrees/Events-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/iidrees/Events-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/iidrees/Events-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iidrees/Events-Manager/labels{/name}","releases_url":"https://api.github.com/repos/iidrees/Events-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/iidrees/Events-Manager/deployments","created_at":"2017-11-13T14:57:06Z","updated_at":"2018-05-17T07:54:00Z","pushed_at":"2018-05-19T09:01:00Z","git_url":"git://github.com/iidrees/Events-Manager.git","ssh_url":"git@github.com:iidrees/Events-Manager.git","clone_url":"https://github.com/iidrees/Events-Manager.git","svn_url":"https://github.com/iidrees/Events-Manager","homepage":"https://events-manager-cp.herokuapp.com/","size":13346,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"iidrees:master","ref":"master","sha":"29a9c2a3983cd471b554b452468497f95e9b6a18","user":{"login":"iidrees","id":24682326,"avatar_url":"https://avatars1.githubusercontent.com/u/24682326?v=4","gravatar_id":"","url":"https://api.github.com/users/iidrees","html_url":"https://github.com/iidrees","followers_url":"https://api.github.com/users/iidrees/followers","following_url":"https://api.github.com/users/iidrees/following{/other_user}","gists_url":"https://api.github.com/users/iidrees/gists{/gist_id}","starred_url":"https://api.github.com/users/iidrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iidrees/subscriptions","organizations_url":"https://api.github.com/users/iidrees/orgs","repos_url":"https://api.github.com/users/iidrees/repos","events_url":"https://api.github.com/users/iidrees/events{/privacy}","received_events_url":"https://api.github.com/users/iidrees/received_events","type":"User","site_admin":false},"repo":{"id":110561880,"name":"Events-Manager","full_name":"iidrees/Events-Manager","owner":{"login":"iidrees","id":24682326,"avatar_url":"https://avatars1.githubusercontent.com/u/24682326?v=4","gravatar_id":"","url":"https://api.github.com/users/iidrees","html_url":"https://github.com/iidrees","followers_url":"https://api.github.com/users/iidrees/followers","following_url":"https://api.github.com/users/iidrees/following{/other_user}","gists_url":"https://api.github.com/users/iidrees/gists{/gist_id}","starred_url":"https://api.github.com/users/iidrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iidrees/subscriptions","organizations_url":"https://api.github.com/users/iidrees/orgs","repos_url":"https://api.github.com/users/iidrees/repos","events_url":"https://api.github.com/users/iidrees/events{/privacy}","received_events_url":"https://api.github.com/users/iidrees/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iidrees/Events-Manager","description":"An application that allows Event Centers owners provide centers to event planners who may be looking for a good event center to use for their events","fork":false,"url":"https://api.github.com/repos/iidrees/Events-Manager","forks_url":"https://api.github.com/repos/iidrees/Events-Manager/forks","keys_url":"https://api.github.com/repos/iidrees/Events-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iidrees/Events-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iidrees/Events-Manager/teams","hooks_url":"https://api.github.com/repos/iidrees/Events-Manager/hooks","issue_events_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/iidrees/Events-Manager/events","assignees_url":"https://api.github.com/repos/iidrees/Events-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/iidrees/Events-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/iidrees/Events-Manager/tags","blobs_url":"https://api.github.com/repos/iidrees/Events-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iidrees/Events-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iidrees/Events-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/iidrees/Events-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iidrees/Events-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/iidrees/Events-Manager/languages","stargazers_url":"https://api.github.com/repos/iidrees/Events-Manager/stargazers","contributors_url":"https://api.github.com/repos/iidrees/Events-Manager/contributors","subscribers_url":"https://api.github.com/repos/iidrees/Events-Manager/subscribers","subscription_url":"https://api.github.com/repos/iidrees/Events-Manager/subscription","commits_url":"https://api.github.com/repos/iidrees/Events-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/iidrees/Events-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/iidrees/Events-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/iidrees/Events-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/iidrees/Events-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/iidrees/Events-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iidrees/Events-Manager/merges","archive_url":"https://api.github.com/repos/iidrees/Events-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iidrees/Events-Manager/downloads","issues_url":"https://api.github.com/repos/iidrees/Events-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/iidrees/Events-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/iidrees/Events-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/iidrees/Events-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iidrees/Events-Manager/labels{/name}","releases_url":"https://api.github.com/repos/iidrees/Events-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/iidrees/Events-Manager/deployments","created_at":"2017-11-13T14:57:06Z","updated_at":"2018-05-17T07:54:00Z","pushed_at":"2018-05-19T09:01:00Z","git_url":"git://github.com/iidrees/Events-Manager.git","ssh_url":"git@github.com:iidrees/Events-Manager.git","clone_url":"https://github.com/iidrees/Events-Manager.git","svn_url":"https://github.com/iidrees/Events-Manager","homepage":"https://events-manager-cp.herokuapp.com/","size":13346,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85"},"html":{"href":"https://github.com/iidrees/Events-Manager/pull/85"},"issue":{"href":"https://api.github.com/repos/iidrees/Events-Manager/issues/85"},"comments":{"href":"https://api.github.com/repos/iidrees/Events-Manager/issues/85/comments"},"review_comments":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85/comments"},"review_comment":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iidrees/Events-Manager/pulls/85/commits"},"statuses":{"href":"https://api.github.com/repos/iidrees/Events-Manager/statuses/7268b20d200121836ba7b5babdad4a0e71bef5ad"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}