{"action":"created","comment":{"url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments/178443929","pull_request_review_id":108504654,"id":178443929,"diff_hunk":"@@ -155,7 +156,52 @@ module.exports = {\n       });\n   },\n   search(req, res) {\n-    return res.status(500).send('Not Implemented Error');\n+    const {\n+      name, area, state, capacity, type, facilities, amount,\n+    } = req.query;\n+\n+    let searchCondition = '';\n+\n+    if (name && name.length > 1) {\n+      searchCondition += ` AND lower(name) LIKE '%${name.toLowerCase()}%'`;\n+    }\n+    if (area && area.length > 1) {\n+      searchCondition += ` AND lower(area) LIKE '%${area.toLowerCase()}%'`;\n+    }\n+\n+    const stateInt = parseInt(state);\n+    if (state && stateInt >= 0 && stateInt < 36) searchCondition += ` AND state='${state}'`;\n+    if (capacity && parseInt(capacity) > 0) searchCondition += ` AND capacity='${capacity}'`;\n+\n+    const typeInt = parseInt(type);\n+    if (type && typeInt >= 0) searchCondition += ` AND type='${type}'`;","path":"server/v2/controllers/center.js","position":31,"original_position":31,"commit_id":"91746803ae20282e8c691baed72c220e847c6ccd","original_commit_id":"91746803ae20282e8c691baed72c220e847c6ccd","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":"'template literal syntax' is only available in ES6 (use 'esversion: 6').","created_at":"2018-03-31T22:52:28Z","updated_at":"2018-03-31T22:52:29Z","html_url":"https://github.com/omokolataiwo/eventmanager/pull/21#discussion_r178443929","pull_request_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments/178443929"},"html":{"href":"https://github.com/omokolataiwo/eventmanager/pull/21#discussion_r178443929"},"pull_request":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21","id":178703904,"html_url":"https://github.com/omokolataiwo/eventmanager/pull/21","diff_url":"https://github.com/omokolataiwo/eventmanager/pull/21.diff","patch_url":"https://github.com/omokolataiwo/eventmanager/pull/21.patch","issue_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/21","number":21,"state":"closed","locked":false,"title":"#156419056: Search for Event Centers","user":{"login":"omokolataiwo","id":30238960,"avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n- [x] Create OverlaySearch component for home page\r\n- [x] Add dynamic search query builder to endpoint\r\n- [x] Add search reducer\r\n\r\n#### Description of Task to be completed?\r\n- Create OverlaySearch component with search parameters\r\n- Store valid parameters inside localStorage\r\n- Redirect to centers page component\r\n- Send valid parameters to endpoints\r\n- Build dynamic SQL query\r\n- Receive response from endpoint\r\n- Present data\r\n\r\n#### How should this be manually tested?\r\n- clone repository\r\n- navigate to eventmanager\r\n- `npm install`\r\n- `npm start`\r\n\r\n#### Any background context you want to provide?\r\nN/A\r\n#### What are the relevant pivotal tracker stories?\r\n[Finishes: #156419056]\r\n","created_at":"2018-03-31T22:52:15Z","updated_at":"2018-03-31T22:52:30Z","closed_at":"2018-03-31T22:52:27Z","merged_at":"2018-03-31T22:52:27Z","merge_commit_sha":"857cada9efe48a670e6f3bcfc76fd0086669c85a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21/commits","review_comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21/comments","review_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/21/comments","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/91746803ae20282e8c691baed72c220e847c6ccd","head":{"label":"omokolataiwo:feature/156419056/centers-search","ref":"feature/156419056/centers-search","sha":"91746803ae20282e8c691baed72c220e847c6ccd","user":{"login":"omokolataiwo","id":30238960,"avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"repo":{"id":110697270,"name":"eventmanager","full_name":"omokolataiwo/eventmanager","owner":{"login":"omokolataiwo","id":30238960,"avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omokolataiwo/eventmanager","description":"EventManager that manages your booking for your events. EventManager is very convenient way of booking your events. ","fork":false,"url":"https://api.github.com/repos/omokolataiwo/eventmanager","forks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/forks","keys_url":"https://api.github.com/repos/omokolataiwo/eventmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omokolataiwo/eventmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omokolataiwo/eventmanager/teams","hooks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/hooks","issue_events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/events{/number}","events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/events","assignees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/assignees{/user}","branches_url":"https://api.github.com/repos/omokolataiwo/eventmanager/branches{/branch}","tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/tags","blobs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/omokolataiwo/eventmanager/languages","stargazers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/stargazers","contributors_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contributors","subscribers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscribers","subscription_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscription","commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contents/{+path}","compare_url":"https://api.github.com/repos/omokolataiwo/eventmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omokolataiwo/eventmanager/merges","archive_url":"https://api.github.com/repos/omokolataiwo/eventmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omokolataiwo/eventmanager/downloads","issues_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues{/number}","pulls_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/omokolataiwo/eventmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/omokolataiwo/eventmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omokolataiwo/eventmanager/labels{/name}","releases_url":"https://api.github.com/repos/omokolataiwo/eventmanager/releases{/id}","deployments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/deployments","created_at":"2017-11-14T13:59:38Z","updated_at":"2018-03-31T22:52:29Z","pushed_at":"2018-03-31T22:52:28Z","git_url":"git://github.com/omokolataiwo/eventmanager.git","ssh_url":"git@github.com:omokolataiwo/eventmanager.git","clone_url":"https://github.com/omokolataiwo/eventmanager.git","svn_url":"https://github.com/omokolataiwo/eventmanager","homepage":"","size":8106,"stargazers_count":1,"watchers_count":1,"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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"omokolataiwo:develop","ref":"develop","sha":"4a8600ddf469415dedbc242f3ab8022de2ffe799","user":{"login":"omokolataiwo","id":30238960,"avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"repo":{"id":110697270,"name":"eventmanager","full_name":"omokolataiwo/eventmanager","owner":{"login":"omokolataiwo","id":30238960,"avatar_url":"https://avatars3.githubusercontent.com/u/30238960?v=4","gravatar_id":"","url":"https://api.github.com/users/omokolataiwo","html_url":"https://github.com/omokolataiwo","followers_url":"https://api.github.com/users/omokolataiwo/followers","following_url":"https://api.github.com/users/omokolataiwo/following{/other_user}","gists_url":"https://api.github.com/users/omokolataiwo/gists{/gist_id}","starred_url":"https://api.github.com/users/omokolataiwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omokolataiwo/subscriptions","organizations_url":"https://api.github.com/users/omokolataiwo/orgs","repos_url":"https://api.github.com/users/omokolataiwo/repos","events_url":"https://api.github.com/users/omokolataiwo/events{/privacy}","received_events_url":"https://api.github.com/users/omokolataiwo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omokolataiwo/eventmanager","description":"EventManager that manages your booking for your events. EventManager is very convenient way of booking your events. ","fork":false,"url":"https://api.github.com/repos/omokolataiwo/eventmanager","forks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/forks","keys_url":"https://api.github.com/repos/omokolataiwo/eventmanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omokolataiwo/eventmanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omokolataiwo/eventmanager/teams","hooks_url":"https://api.github.com/repos/omokolataiwo/eventmanager/hooks","issue_events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/events{/number}","events_url":"https://api.github.com/repos/omokolataiwo/eventmanager/events","assignees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/assignees{/user}","branches_url":"https://api.github.com/repos/omokolataiwo/eventmanager/branches{/branch}","tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/tags","blobs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/{sha}","languages_url":"https://api.github.com/repos/omokolataiwo/eventmanager/languages","stargazers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/stargazers","contributors_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contributors","subscribers_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscribers","subscription_url":"https://api.github.com/repos/omokolataiwo/eventmanager/subscription","commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/omokolataiwo/eventmanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/omokolataiwo/eventmanager/contents/{+path}","compare_url":"https://api.github.com/repos/omokolataiwo/eventmanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omokolataiwo/eventmanager/merges","archive_url":"https://api.github.com/repos/omokolataiwo/eventmanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omokolataiwo/eventmanager/downloads","issues_url":"https://api.github.com/repos/omokolataiwo/eventmanager/issues{/number}","pulls_url":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls{/number}","milestones_url":"https://api.github.com/repos/omokolataiwo/eventmanager/milestones{/number}","notifications_url":"https://api.github.com/repos/omokolataiwo/eventmanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omokolataiwo/eventmanager/labels{/name}","releases_url":"https://api.github.com/repos/omokolataiwo/eventmanager/releases{/id}","deployments_url":"https://api.github.com/repos/omokolataiwo/eventmanager/deployments","created_at":"2017-11-14T13:59:38Z","updated_at":"2018-03-31T22:52:29Z","pushed_at":"2018-03-31T22:52:28Z","git_url":"git://github.com/omokolataiwo/eventmanager.git","ssh_url":"git@github.com:omokolataiwo/eventmanager.git","clone_url":"https://github.com/omokolataiwo/eventmanager.git","svn_url":"https://github.com/omokolataiwo/eventmanager","homepage":"","size":8106,"stargazers_count":1,"watchers_count":1,"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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21"},"html":{"href":"https://github.com/omokolataiwo/eventmanager/pull/21"},"issue":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/21"},"comments":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/omokolataiwo/eventmanager/statuses/91746803ae20282e8c691baed72c220e847c6ccd"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}