{"action":"created","comment":{"url":"https://api.github.com/repos/evercam/evercam-api/pulls/comments/36283485","id":36283485,"diff_hunk":"@@ -303,11 +308,12 @@ class V1SnapshotRoutes < Grape::API\n           else\n             timestamp = ActiveSupport::TimeZone.new('UTC').parse(params[:timestamp])\n           end\n-          snapshot = camera.snapshot_by_ts!(timestamp, params[:range].to_i)\n+          snapshot = Snapshot.snapshot_by_ts!(camera.id, timestamp, params[:range].to_i)\n           rights   = requester_rights_for(camera)\n           raise AuthorizationError.new unless rights.allow?(AccessRight::LIST)\n \n-          present Array(snapshot), with: Presenters::Snapshot, with_data: params[:with_data]\n+          present(Array(snapshot), with: Presenters::Snapshot,\n+                  with_data: params[:with_data], exid: camera.exid)","path":"app/api/v1/routes/snapshot_routes.rb","position":89,"original_position":89,"commit_id":"5edb35e9128faa3fa9a0f00e445102d8e0908b83","original_commit_id":"5edb35e9128faa3fa9a0f00e445102d8e0908b83","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Align the elements of a hash literal if they span more than one line.","created_at":"2015-08-05T09:24:58Z","updated_at":"2015-08-05T09:24:58Z","html_url":"https://github.com/evercam/evercam-api/pull/392#discussion_r36283485","pull_request_url":"https://api.github.com/repos/evercam/evercam-api/pulls/392","_links":{"self":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/comments/36283485"},"html":{"href":"https://github.com/evercam/evercam-api/pull/392#discussion_r36283485"},"pull_request":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/evercam/evercam-api/pulls/392","id":41543040,"html_url":"https://github.com/evercam/evercam-api/pull/392","diff_url":"https://github.com/evercam/evercam-api/pull/392.diff","patch_url":"https://github.com/evercam/evercam-api/pull/392.patch","issue_url":"https://api.github.com/repos/evercam/evercam-api/issues/392","number":392,"state":"open","locked":false,"title":"Changed queries in snapshot route","user":{"login":"azharmalik3","id":6176136,"avatar_url":"https://avatars.githubusercontent.com/u/6176136?v=3","gravatar_id":"","url":"https://api.github.com/users/azharmalik3","html_url":"https://github.com/azharmalik3","followers_url":"https://api.github.com/users/azharmalik3/followers","following_url":"https://api.github.com/users/azharmalik3/following{/other_user}","gists_url":"https://api.github.com/users/azharmalik3/gists{/gist_id}","starred_url":"https://api.github.com/users/azharmalik3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azharmalik3/subscriptions","organizations_url":"https://api.github.com/users/azharmalik3/orgs","repos_url":"https://api.github.com/users/azharmalik3/repos","events_url":"https://api.github.com/users/azharmalik3/events{/privacy}","received_events_url":"https://api.github.com/users/azharmalik3/received_events","type":"User","site_admin":false},"body":"@mosic changed database string for snapshot table and also modified snapshot queries.","created_at":"2015-08-04T07:55:49Z","updated_at":"2015-08-05T09:24:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/evercam/evercam-api/pulls/392/commits","review_comments_url":"https://api.github.com/repos/evercam/evercam-api/pulls/392/comments","review_comment_url":"https://api.github.com/repos/evercam/evercam-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evercam/evercam-api/issues/392/comments","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/5edb35e9128faa3fa9a0f00e445102d8e0908b83","head":{"label":"evercam:multiple_database_connect","ref":"multiple_database_connect","sha":"5edb35e9128faa3fa9a0f00e445102d8e0908b83","user":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"repo":{"id":14651973,"name":"evercam-api","full_name":"evercam/evercam-api","owner":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evercam/evercam-api","description":"Grape application that manages all communication between Evecam Media & Evercam Clients","fork":false,"url":"https://api.github.com/repos/evercam/evercam-api","forks_url":"https://api.github.com/repos/evercam/evercam-api/forks","keys_url":"https://api.github.com/repos/evercam/evercam-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evercam/evercam-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evercam/evercam-api/teams","hooks_url":"https://api.github.com/repos/evercam/evercam-api/hooks","issue_events_url":"https://api.github.com/repos/evercam/evercam-api/issues/events{/number}","events_url":"https://api.github.com/repos/evercam/evercam-api/events","assignees_url":"https://api.github.com/repos/evercam/evercam-api/assignees{/user}","branches_url":"https://api.github.com/repos/evercam/evercam-api/branches{/branch}","tags_url":"https://api.github.com/repos/evercam/evercam-api/tags","blobs_url":"https://api.github.com/repos/evercam/evercam-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evercam/evercam-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evercam/evercam-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/evercam/evercam-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/{sha}","languages_url":"https://api.github.com/repos/evercam/evercam-api/languages","stargazers_url":"https://api.github.com/repos/evercam/evercam-api/stargazers","contributors_url":"https://api.github.com/repos/evercam/evercam-api/contributors","subscribers_url":"https://api.github.com/repos/evercam/evercam-api/subscribers","subscription_url":"https://api.github.com/repos/evercam/evercam-api/subscription","commits_url":"https://api.github.com/repos/evercam/evercam-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/evercam/evercam-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/evercam/evercam-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/evercam/evercam-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/evercam/evercam-api/contents/{+path}","compare_url":"https://api.github.com/repos/evercam/evercam-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evercam/evercam-api/merges","archive_url":"https://api.github.com/repos/evercam/evercam-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evercam/evercam-api/downloads","issues_url":"https://api.github.com/repos/evercam/evercam-api/issues{/number}","pulls_url":"https://api.github.com/repos/evercam/evercam-api/pulls{/number}","milestones_url":"https://api.github.com/repos/evercam/evercam-api/milestones{/number}","notifications_url":"https://api.github.com/repos/evercam/evercam-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evercam/evercam-api/labels{/name}","releases_url":"https://api.github.com/repos/evercam/evercam-api/releases{/id}","created_at":"2013-11-23T22:52:01Z","updated_at":"2015-06-10T13:35:05Z","pushed_at":"2015-08-05T09:24:53Z","git_url":"git://github.com/evercam/evercam-api.git","ssh_url":"git@github.com:evercam/evercam-api.git","clone_url":"https://github.com/evercam/evercam-api.git","svn_url":"https://github.com/evercam/evercam-api","homepage":"http://dash.evercam.io/swagger","size":114665,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":13,"forks":3,"open_issues":13,"watchers":3,"default_branch":"master"}},"base":{"label":"evercam:master","ref":"master","sha":"260ef292423200531595cd9dd5987265fb093e8d","user":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"repo":{"id":14651973,"name":"evercam-api","full_name":"evercam/evercam-api","owner":{"login":"evercam","id":5575404,"avatar_url":"https://avatars.githubusercontent.com/u/5575404?v=3","gravatar_id":"","url":"https://api.github.com/users/evercam","html_url":"https://github.com/evercam","followers_url":"https://api.github.com/users/evercam/followers","following_url":"https://api.github.com/users/evercam/following{/other_user}","gists_url":"https://api.github.com/users/evercam/gists{/gist_id}","starred_url":"https://api.github.com/users/evercam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evercam/subscriptions","organizations_url":"https://api.github.com/users/evercam/orgs","repos_url":"https://api.github.com/users/evercam/repos","events_url":"https://api.github.com/users/evercam/events{/privacy}","received_events_url":"https://api.github.com/users/evercam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evercam/evercam-api","description":"Grape application that manages all communication between Evecam Media & Evercam Clients","fork":false,"url":"https://api.github.com/repos/evercam/evercam-api","forks_url":"https://api.github.com/repos/evercam/evercam-api/forks","keys_url":"https://api.github.com/repos/evercam/evercam-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evercam/evercam-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evercam/evercam-api/teams","hooks_url":"https://api.github.com/repos/evercam/evercam-api/hooks","issue_events_url":"https://api.github.com/repos/evercam/evercam-api/issues/events{/number}","events_url":"https://api.github.com/repos/evercam/evercam-api/events","assignees_url":"https://api.github.com/repos/evercam/evercam-api/assignees{/user}","branches_url":"https://api.github.com/repos/evercam/evercam-api/branches{/branch}","tags_url":"https://api.github.com/repos/evercam/evercam-api/tags","blobs_url":"https://api.github.com/repos/evercam/evercam-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evercam/evercam-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evercam/evercam-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/evercam/evercam-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evercam/evercam-api/statuses/{sha}","languages_url":"https://api.github.com/repos/evercam/evercam-api/languages","stargazers_url":"https://api.github.com/repos/evercam/evercam-api/stargazers","contributors_url":"https://api.github.com/repos/evercam/evercam-api/contributors","subscribers_url":"https://api.github.com/repos/evercam/evercam-api/subscribers","subscription_url":"https://api.github.com/repos/evercam/evercam-api/subscription","commits_url":"https://api.github.com/repos/evercam/evercam-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/evercam/evercam-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/evercam/evercam-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/evercam/evercam-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/evercam/evercam-api/contents/{+path}","compare_url":"https://api.github.com/repos/evercam/evercam-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evercam/evercam-api/merges","archive_url":"https://api.github.com/repos/evercam/evercam-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evercam/evercam-api/downloads","issues_url":"https://api.github.com/repos/evercam/evercam-api/issues{/number}","pulls_url":"https://api.github.com/repos/evercam/evercam-api/pulls{/number}","milestones_url":"https://api.github.com/repos/evercam/evercam-api/milestones{/number}","notifications_url":"https://api.github.com/repos/evercam/evercam-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evercam/evercam-api/labels{/name}","releases_url":"https://api.github.com/repos/evercam/evercam-api/releases{/id}","created_at":"2013-11-23T22:52:01Z","updated_at":"2015-06-10T13:35:05Z","pushed_at":"2015-08-05T09:24:53Z","git_url":"git://github.com/evercam/evercam-api.git","ssh_url":"git@github.com:evercam/evercam-api.git","clone_url":"https://github.com/evercam/evercam-api.git","svn_url":"https://github.com/evercam/evercam-api","homepage":"http://dash.evercam.io/swagger","size":114665,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":13,"forks":3,"open_issues":13,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/392"},"html":{"href":"https://github.com/evercam/evercam-api/pull/392"},"issue":{"href":"https://api.github.com/repos/evercam/evercam-api/issues/392"},"comments":{"href":"https://api.github.com/repos/evercam/evercam-api/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evercam/evercam-api/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/evercam/evercam-api/statuses/5edb35e9128faa3fa9a0f00e445102d8e0908b83"}}}}