{"action":"created","comment":{"url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/comments/207228634","pull_request_review_id":142792260,"id":207228634,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzIyODYzNA==","diff_hunk":"@@ -0,0 +1,37 @@\n+import { Router, Request, Response } from \"express\";\n+\n+import { getDataFromDatabase } from \"../../helpers\";\n+\n+const router: Router = Router();\n+\n+router.get(\"/\", (req: Request, res: Response) => {\n+  res.send(getDataFromDatabase()[0].title);\n+});\n+\n+router.get(\"/rId/:id\", (req: Request, res: Response) => {\n+  const { id } = req.params;\n+  res.send(searchForRecipesById(id));\n+});\n+\n+router.get(\"/title/:searchQuery\", (req: Request, res: Response) => {\n+  const { searchQuery } = req.params;\n+  res.send(searchForRecipesByTitle(searchQuery));\n+});\n+\n+router.get(\"/title\", (req: Request, res: Response) => {\n+  res.send(getDataFromDatabase().splice(0, 10));\n+});\n+\n+function searchForRecipesByTitle(searchQuery: string): string {","path":"app/controllers/search/search.controller.ts","position":25,"original_position":25,"commit_id":"bf1f32b0d21c7e880f04a89a7613322ace44dfd9","original_commit_id":"bf1f32b0d21c7e880f04a89a7613322ace44dfd9","user":{"login":"EimD","id":17217341,"node_id":"MDQ6VXNlcjE3MjE3MzQx","avatar_url":"https://avatars0.githubusercontent.com/u/17217341?v=4","gravatar_id":"","url":"https://api.github.com/users/EimD","html_url":"https://github.com/EimD","followers_url":"https://api.github.com/users/EimD/followers","following_url":"https://api.github.com/users/EimD/following{/other_user}","gists_url":"https://api.github.com/users/EimD/gists{/gist_id}","starred_url":"https://api.github.com/users/EimD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EimD/subscriptions","organizations_url":"https://api.github.com/users/EimD/orgs","repos_url":"https://api.github.com/users/EimD/repos","events_url":"https://api.github.com/users/EimD/events{/privacy}","received_events_url":"https://api.github.com/users/EimD/received_events","type":"User","site_admin":false},"body":"Move to separate file.","created_at":"2018-08-02T13:39:16Z","updated_at":"2018-08-02T13:43:21Z","html_url":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1#discussion_r207228634","pull_request_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/comments/207228634"},"html":{"href":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1#discussion_r207228634"},"pull_request":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1","id":205683340,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjgzMzQw","html_url":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1","diff_url":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1.diff","patch_url":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1.patch","issue_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/1","number":1,"state":"open","locked":false,"title":"Feature/basic search by title","user":{"login":"martynaspuskunigis","id":39139245,"node_id":"MDQ6VXNlcjM5MTM5MjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/39139245?v=4","gravatar_id":"","url":"https://api.github.com/users/martynaspuskunigis","html_url":"https://github.com/martynaspuskunigis","followers_url":"https://api.github.com/users/martynaspuskunigis/followers","following_url":"https://api.github.com/users/martynaspuskunigis/following{/other_user}","gists_url":"https://api.github.com/users/martynaspuskunigis/gists{/gist_id}","starred_url":"https://api.github.com/users/martynaspuskunigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martynaspuskunigis/subscriptions","organizations_url":"https://api.github.com/users/martynaspuskunigis/orgs","repos_url":"https://api.github.com/users/martynaspuskunigis/repos","events_url":"https://api.github.com/users/martynaspuskunigis/events{/privacy}","received_events_url":"https://api.github.com/users/martynaspuskunigis/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-02T10:09:27Z","updated_at":"2018-08-02T13:43:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"423f6bc72c35fb1dba33deedffe8949307cc344f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1/commits","review_comments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1/comments","review_comment_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/1/comments","statuses_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/statuses/bf1f32b0d21c7e880f04a89a7613322ace44dfd9","head":{"label":"martynaspuskunigis:feature/basic-search-by-title","ref":"feature/basic-search-by-title","sha":"bf1f32b0d21c7e880f04a89a7613322ace44dfd9","user":{"login":"martynaspuskunigis","id":39139245,"node_id":"MDQ6VXNlcjM5MTM5MjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/39139245?v=4","gravatar_id":"","url":"https://api.github.com/users/martynaspuskunigis","html_url":"https://github.com/martynaspuskunigis","followers_url":"https://api.github.com/users/martynaspuskunigis/followers","following_url":"https://api.github.com/users/martynaspuskunigis/following{/other_user}","gists_url":"https://api.github.com/users/martynaspuskunigis/gists{/gist_id}","starred_url":"https://api.github.com/users/martynaspuskunigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martynaspuskunigis/subscriptions","organizations_url":"https://api.github.com/users/martynaspuskunigis/orgs","repos_url":"https://api.github.com/users/martynaspuskunigis/repos","events_url":"https://api.github.com/users/martynaspuskunigis/events{/privacy}","received_events_url":"https://api.github.com/users/martynaspuskunigis/received_events","type":"User","site_admin":false},"repo":{"id":143203089,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyMDMwODk=","name":"recipes-seach-backend","full_name":"martynaspuskunigis/recipes-seach-backend","owner":{"login":"martynaspuskunigis","id":39139245,"node_id":"MDQ6VXNlcjM5MTM5MjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/39139245?v=4","gravatar_id":"","url":"https://api.github.com/users/martynaspuskunigis","html_url":"https://github.com/martynaspuskunigis","followers_url":"https://api.github.com/users/martynaspuskunigis/followers","following_url":"https://api.github.com/users/martynaspuskunigis/following{/other_user}","gists_url":"https://api.github.com/users/martynaspuskunigis/gists{/gist_id}","starred_url":"https://api.github.com/users/martynaspuskunigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martynaspuskunigis/subscriptions","organizations_url":"https://api.github.com/users/martynaspuskunigis/orgs","repos_url":"https://api.github.com/users/martynaspuskunigis/repos","events_url":"https://api.github.com/users/martynaspuskunigis/events{/privacy}","received_events_url":"https://api.github.com/users/martynaspuskunigis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martynaspuskunigis/recipes-seach-backend","description":"Express Typescript backend for my recipes search app","fork":false,"url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend","forks_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/forks","keys_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/teams","hooks_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/hooks","issue_events_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/events{/number}","events_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/events","assignees_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/assignees{/user}","branches_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/branches{/branch}","tags_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/tags","blobs_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/languages","stargazers_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/stargazers","contributors_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/contributors","subscribers_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/subscribers","subscription_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/subscription","commits_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/contents/{+path}","compare_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/merges","archive_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/downloads","issues_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues{/number}","pulls_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/labels{/name}","releases_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/releases{/id}","deployments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/deployments","created_at":"2018-08-01T20:03:03Z","updated_at":"2018-08-01T20:08:24Z","pushed_at":"2018-08-02T13:22:26Z","git_url":"git://github.com/martynaspuskunigis/recipes-seach-backend.git","ssh_url":"git@github.com:martynaspuskunigis/recipes-seach-backend.git","clone_url":"https://github.com/martynaspuskunigis/recipes-seach-backend.git","svn_url":"https://github.com/martynaspuskunigis/recipes-seach-backend","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"martynaspuskunigis:dev","ref":"dev","sha":"b3239616207989117581d2efbbe0b13165a7cc23","user":{"login":"martynaspuskunigis","id":39139245,"node_id":"MDQ6VXNlcjM5MTM5MjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/39139245?v=4","gravatar_id":"","url":"https://api.github.com/users/martynaspuskunigis","html_url":"https://github.com/martynaspuskunigis","followers_url":"https://api.github.com/users/martynaspuskunigis/followers","following_url":"https://api.github.com/users/martynaspuskunigis/following{/other_user}","gists_url":"https://api.github.com/users/martynaspuskunigis/gists{/gist_id}","starred_url":"https://api.github.com/users/martynaspuskunigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martynaspuskunigis/subscriptions","organizations_url":"https://api.github.com/users/martynaspuskunigis/orgs","repos_url":"https://api.github.com/users/martynaspuskunigis/repos","events_url":"https://api.github.com/users/martynaspuskunigis/events{/privacy}","received_events_url":"https://api.github.com/users/martynaspuskunigis/received_events","type":"User","site_admin":false},"repo":{"id":143203089,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyMDMwODk=","name":"recipes-seach-backend","full_name":"martynaspuskunigis/recipes-seach-backend","owner":{"login":"martynaspuskunigis","id":39139245,"node_id":"MDQ6VXNlcjM5MTM5MjQ1","avatar_url":"https://avatars2.githubusercontent.com/u/39139245?v=4","gravatar_id":"","url":"https://api.github.com/users/martynaspuskunigis","html_url":"https://github.com/martynaspuskunigis","followers_url":"https://api.github.com/users/martynaspuskunigis/followers","following_url":"https://api.github.com/users/martynaspuskunigis/following{/other_user}","gists_url":"https://api.github.com/users/martynaspuskunigis/gists{/gist_id}","starred_url":"https://api.github.com/users/martynaspuskunigis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martynaspuskunigis/subscriptions","organizations_url":"https://api.github.com/users/martynaspuskunigis/orgs","repos_url":"https://api.github.com/users/martynaspuskunigis/repos","events_url":"https://api.github.com/users/martynaspuskunigis/events{/privacy}","received_events_url":"https://api.github.com/users/martynaspuskunigis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martynaspuskunigis/recipes-seach-backend","description":"Express Typescript backend for my recipes search app","fork":false,"url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend","forks_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/forks","keys_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/teams","hooks_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/hooks","issue_events_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/events{/number}","events_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/events","assignees_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/assignees{/user}","branches_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/branches{/branch}","tags_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/tags","blobs_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/languages","stargazers_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/stargazers","contributors_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/contributors","subscribers_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/subscribers","subscription_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/subscription","commits_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/contents/{+path}","compare_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/merges","archive_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/downloads","issues_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues{/number}","pulls_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/labels{/name}","releases_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/releases{/id}","deployments_url":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/deployments","created_at":"2018-08-01T20:03:03Z","updated_at":"2018-08-01T20:08:24Z","pushed_at":"2018-08-02T13:22:26Z","git_url":"git://github.com/martynaspuskunigis/recipes-seach-backend.git","ssh_url":"git@github.com:martynaspuskunigis/recipes-seach-backend.git","clone_url":"https://github.com/martynaspuskunigis/recipes-seach-backend.git","svn_url":"https://github.com/martynaspuskunigis/recipes-seach-backend","homepage":null,"size":35,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1"},"html":{"href":"https://github.com/martynaspuskunigis/recipes-seach-backend/pull/1"},"issue":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/1"},"comments":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/martynaspuskunigis/recipes-seach-backend/statuses/bf1f32b0d21c7e880f04a89a7613322ace44dfd9"}},"author_association":"OWNER"}}
{"actor":{"display_login":"EimD"}}