{"action":"created","comment":{"url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/comments/24226186","id":24226186,"diff_hunk":"@@ -81,8 +95,46 @@ function findByDateAndCity(startDate, endDate, city, page) {\n     ).skip(\n       PAGE_LIMIT*page\n     ).sort({\n-      when: 'desc'\n+      when: 'asc'\n     });\n   }  \n   return query.exec();\n }\n+\n+function findByQuery(search, page) {\n+  var searchRegex = new RegExp(search, 'i');\n+  /*jshint validthis:true */\n+  var query = this.find().or([\n+    {name: searchRegex},\n+    {city: searchRegex},\n+    {address: searchRegex}\n+  ]);\n+\n+  page = parseInt(page, 10);\n+  page -= 1;\n+\n+  query.limit(\n+      PAGE_LIMIT\n+  ).skip(\n+      PAGE_LIMIT*page\n+  ).sort({\n+      name: 'asc'","path":"server/modules/plays/model.js","position":84,"original_position":84,"commit_id":"2175342146e147a9c4076b2ecb4eb9c7614a9147","original_commit_id":"2175342146e147a9c4076b2ecb4eb9c7614a9147","user":{"login":"artyomtrityak","id":957406,"avatar_url":"https://avatars.githubusercontent.com/u/957406?v=3","gravatar_id":"","url":"https://api.github.com/users/artyomtrityak","html_url":"https://github.com/artyomtrityak","followers_url":"https://api.github.com/users/artyomtrityak/followers","following_url":"https://api.github.com/users/artyomtrityak/following{/other_user}","gists_url":"https://api.github.com/users/artyomtrityak/gists{/gist_id}","starred_url":"https://api.github.com/users/artyomtrityak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artyomtrityak/subscriptions","organizations_url":"https://api.github.com/users/artyomtrityak/orgs","repos_url":"https://api.github.com/users/artyomtrityak/repos","events_url":"https://api.github.com/users/artyomtrityak/events{/privacy}","received_events_url":"https://api.github.com/users/artyomtrityak/received_events","type":"User","site_admin":false},"body":"it should be desc","created_at":"2015-02-06T07:28:54Z","updated_at":"2015-02-06T07:28:54Z","html_url":"https://github.com/board-games-calendar/board-games-calendar/pull/111#discussion_r24226186","pull_request_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/comments/24226186"},"html":{"href":"https://github.com/board-games-calendar/board-games-calendar/pull/111#discussion_r24226186"},"pull_request":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111","id":28772647,"html_url":"https://github.com/board-games-calendar/board-games-calendar/pull/111","diff_url":"https://github.com/board-games-calendar/board-games-calendar/pull/111.diff","patch_url":"https://github.com/board-games-calendar/board-games-calendar/pull/111.patch","issue_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/111","number":111,"state":"open","locked":false,"title":"feature - announced plays list","user":{"login":"andrewMuntyan","id":1164826,"avatar_url":"https://avatars.githubusercontent.com/u/1164826?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewMuntyan","html_url":"https://github.com/andrewMuntyan","followers_url":"https://api.github.com/users/andrewMuntyan/followers","following_url":"https://api.github.com/users/andrewMuntyan/following{/other_user}","gists_url":"https://api.github.com/users/andrewMuntyan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewMuntyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewMuntyan/subscriptions","organizations_url":"https://api.github.com/users/andrewMuntyan/orgs","repos_url":"https://api.github.com/users/andrewMuntyan/repos","events_url":"https://api.github.com/users/andrewMuntyan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewMuntyan/received_events","type":"User","site_admin":false},"body":"@artyomtrityak check please \"frontend/client/static/app/modules/play/main.js\". I think i could brake it because i had merge and that was night.","created_at":"2015-02-05T23:39:56Z","updated_at":"2015-02-06T07:28:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"edadfb9ec89548640576744eb097098a9a32397f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111/commits","review_comments_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111/comments","review_comment_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/comments/{number}","comments_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/111/comments","statuses_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/statuses/2175342146e147a9c4076b2ecb4eb9c7614a9147","head":{"label":"board-games-calendar:announced-play-list","ref":"announced-play-list","sha":"2175342146e147a9c4076b2ecb4eb9c7614a9147","user":{"login":"board-games-calendar","id":9413299,"avatar_url":"https://avatars.githubusercontent.com/u/9413299?v=3","gravatar_id":"","url":"https://api.github.com/users/board-games-calendar","html_url":"https://github.com/board-games-calendar","followers_url":"https://api.github.com/users/board-games-calendar/followers","following_url":"https://api.github.com/users/board-games-calendar/following{/other_user}","gists_url":"https://api.github.com/users/board-games-calendar/gists{/gist_id}","starred_url":"https://api.github.com/users/board-games-calendar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/board-games-calendar/subscriptions","organizations_url":"https://api.github.com/users/board-games-calendar/orgs","repos_url":"https://api.github.com/users/board-games-calendar/repos","events_url":"https://api.github.com/users/board-games-calendar/events{/privacy}","received_events_url":"https://api.github.com/users/board-games-calendar/received_events","type":"Organization","site_admin":false},"repo":{"id":25809157,"name":"board-games-calendar","full_name":"board-games-calendar/board-games-calendar","owner":{"login":"board-games-calendar","id":9413299,"avatar_url":"https://avatars.githubusercontent.com/u/9413299?v=3","gravatar_id":"","url":"https://api.github.com/users/board-games-calendar","html_url":"https://github.com/board-games-calendar","followers_url":"https://api.github.com/users/board-games-calendar/followers","following_url":"https://api.github.com/users/board-games-calendar/following{/other_user}","gists_url":"https://api.github.com/users/board-games-calendar/gists{/gist_id}","starred_url":"https://api.github.com/users/board-games-calendar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/board-games-calendar/subscriptions","organizations_url":"https://api.github.com/users/board-games-calendar/orgs","repos_url":"https://api.github.com/users/board-games-calendar/repos","events_url":"https://api.github.com/users/board-games-calendar/events{/privacy}","received_events_url":"https://api.github.com/users/board-games-calendar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/board-games-calendar/board-games-calendar","description":"Board games calendar web app. Angular.js, Node.js stack","fork":false,"url":"https://api.github.com/repos/board-games-calendar/board-games-calendar","forks_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/forks","keys_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/teams","hooks_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/hooks","issue_events_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/events{/number}","events_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/events","assignees_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/assignees{/user}","branches_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/branches{/branch}","tags_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/tags","blobs_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/languages","stargazers_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/stargazers","contributors_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/contributors","subscribers_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/subscribers","subscription_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/subscription","commits_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/comments/{number}","contents_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/contents/{+path}","compare_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/merges","archive_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/downloads","issues_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues{/number}","pulls_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/labels{/name}","releases_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/releases{/id}","created_at":"2014-10-27T08:11:00Z","updated_at":"2015-02-05T18:04:40Z","pushed_at":"2015-02-05T23:36:11Z","git_url":"git://github.com/board-games-calendar/board-games-calendar.git","ssh_url":"git@github.com:board-games-calendar/board-games-calendar.git","clone_url":"https://github.com/board-games-calendar/board-games-calendar.git","svn_url":"https://github.com/board-games-calendar/board-games-calendar","homepage":"","size":8458,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":30,"forks":2,"open_issues":30,"watchers":7,"default_branch":"master"}},"base":{"label":"board-games-calendar:master","ref":"master","sha":"cc12b3863cfa6716774dc8170f49b6ec94d3a6b1","user":{"login":"board-games-calendar","id":9413299,"avatar_url":"https://avatars.githubusercontent.com/u/9413299?v=3","gravatar_id":"","url":"https://api.github.com/users/board-games-calendar","html_url":"https://github.com/board-games-calendar","followers_url":"https://api.github.com/users/board-games-calendar/followers","following_url":"https://api.github.com/users/board-games-calendar/following{/other_user}","gists_url":"https://api.github.com/users/board-games-calendar/gists{/gist_id}","starred_url":"https://api.github.com/users/board-games-calendar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/board-games-calendar/subscriptions","organizations_url":"https://api.github.com/users/board-games-calendar/orgs","repos_url":"https://api.github.com/users/board-games-calendar/repos","events_url":"https://api.github.com/users/board-games-calendar/events{/privacy}","received_events_url":"https://api.github.com/users/board-games-calendar/received_events","type":"Organization","site_admin":false},"repo":{"id":25809157,"name":"board-games-calendar","full_name":"board-games-calendar/board-games-calendar","owner":{"login":"board-games-calendar","id":9413299,"avatar_url":"https://avatars.githubusercontent.com/u/9413299?v=3","gravatar_id":"","url":"https://api.github.com/users/board-games-calendar","html_url":"https://github.com/board-games-calendar","followers_url":"https://api.github.com/users/board-games-calendar/followers","following_url":"https://api.github.com/users/board-games-calendar/following{/other_user}","gists_url":"https://api.github.com/users/board-games-calendar/gists{/gist_id}","starred_url":"https://api.github.com/users/board-games-calendar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/board-games-calendar/subscriptions","organizations_url":"https://api.github.com/users/board-games-calendar/orgs","repos_url":"https://api.github.com/users/board-games-calendar/repos","events_url":"https://api.github.com/users/board-games-calendar/events{/privacy}","received_events_url":"https://api.github.com/users/board-games-calendar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/board-games-calendar/board-games-calendar","description":"Board games calendar web app. Angular.js, Node.js stack","fork":false,"url":"https://api.github.com/repos/board-games-calendar/board-games-calendar","forks_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/forks","keys_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/teams","hooks_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/hooks","issue_events_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/events{/number}","events_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/events","assignees_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/assignees{/user}","branches_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/branches{/branch}","tags_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/tags","blobs_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/languages","stargazers_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/stargazers","contributors_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/contributors","subscribers_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/subscribers","subscription_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/subscription","commits_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/comments/{number}","contents_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/contents/{+path}","compare_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/merges","archive_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/downloads","issues_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues{/number}","pulls_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/labels{/name}","releases_url":"https://api.github.com/repos/board-games-calendar/board-games-calendar/releases{/id}","created_at":"2014-10-27T08:11:00Z","updated_at":"2015-02-05T18:04:40Z","pushed_at":"2015-02-05T23:36:11Z","git_url":"git://github.com/board-games-calendar/board-games-calendar.git","ssh_url":"git@github.com:board-games-calendar/board-games-calendar.git","clone_url":"https://github.com/board-games-calendar/board-games-calendar.git","svn_url":"https://github.com/board-games-calendar/board-games-calendar","homepage":"","size":8458,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":30,"forks":2,"open_issues":30,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111"},"html":{"href":"https://github.com/board-games-calendar/board-games-calendar/pull/111"},"issue":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/111"},"comments":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/board-games-calendar/board-games-calendar/statuses/2175342146e147a9c4076b2ecb4eb9c7614a9147"}}}}