{"action":"created","comment":{"url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/comments/119464460","pull_request_review_id":41340471,"id":119464460,"diff_hunk":"@@ -30,3 +31,25 @@ exports.findAll = (params) => {\n   }).fetchAll();\n \n }\n+\n+exports.assignLocation = (movie_id, location_id) => {\n+  let movie;\n+  return new Movie({id: movie_id}).fetch({\n+      withRelated: ['locations']\n+    })\n+  .then((m) => {\n+    movie = m;\n+    return new Location({id: location_id}).fetch();","path":"lib/plugins/features/movies/controller.js","position":21,"original_position":21,"commit_id":"3b8ac28bcfef3167c0cc9837dd03d38a928cac46","original_commit_id":"3b8ac28bcfef3167c0cc9837dd03d38a928cac46","user":{"login":"itsachen","id":666310,"avatar_url":"https://avatars2.githubusercontent.com/u/666310?v=3","gravatar_id":"","url":"https://api.github.com/users/itsachen","html_url":"https://github.com/itsachen","followers_url":"https://api.github.com/users/itsachen/followers","following_url":"https://api.github.com/users/itsachen/following{/other_user}","gists_url":"https://api.github.com/users/itsachen/gists{/gist_id}","starred_url":"https://api.github.com/users/itsachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsachen/subscriptions","organizations_url":"https://api.github.com/users/itsachen/orgs","repos_url":"https://api.github.com/users/itsachen/repos","events_url":"https://api.github.com/users/itsachen/events{/privacy}","received_events_url":"https://api.github.com/users/itsachen/received_events","type":"User","site_admin":false},"body":"Nit: Pad object literal","created_at":"2017-05-31T20:26:43Z","updated_at":"2017-05-31T20:32:07Z","html_url":"https://github.com/tranthibaokhanh/sfmovies/pull/10#discussion_r119464460","pull_request_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/comments/119464460"},"html":{"href":"https://github.com/tranthibaokhanh/sfmovies/pull/10#discussion_r119464460"},"pull_request":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10","id":123342105,"html_url":"https://github.com/tranthibaokhanh/sfmovies/pull/10","diff_url":"https://github.com/tranthibaokhanh/sfmovies/pull/10.diff","patch_url":"https://github.com/tranthibaokhanh/sfmovies/pull/10.patch","issue_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/10","number":10,"state":"open","locked":false,"title":"feat(add-location): adds a location to a movie","user":{"login":"tranthibaokhanh","id":9032603,"avatar_url":"https://avatars3.githubusercontent.com/u/9032603?v=3","gravatar_id":"","url":"https://api.github.com/users/tranthibaokhanh","html_url":"https://github.com/tranthibaokhanh","followers_url":"https://api.github.com/users/tranthibaokhanh/followers","following_url":"https://api.github.com/users/tranthibaokhanh/following{/other_user}","gists_url":"https://api.github.com/users/tranthibaokhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/tranthibaokhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranthibaokhanh/subscriptions","organizations_url":"https://api.github.com/users/tranthibaokhanh/orgs","repos_url":"https://api.github.com/users/tranthibaokhanh/repos","events_url":"https://api.github.com/users/tranthibaokhanh/events{/privacy}","received_events_url":"https://api.github.com/users/tranthibaokhanh/received_events","type":"User","site_admin":false},"body":"WHAT: Create an endpoint to associate a movie with a location\r\nWHY: Miyagi","created_at":"2017-05-31T18:48:25Z","updated_at":"2017-05-31T20:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74e9f8c24e7eb99e85c65297aa31c3f2977b3bb1","assignee":{"login":"itsachen","id":666310,"avatar_url":"https://avatars2.githubusercontent.com/u/666310?v=3","gravatar_id":"","url":"https://api.github.com/users/itsachen","html_url":"https://github.com/itsachen","followers_url":"https://api.github.com/users/itsachen/followers","following_url":"https://api.github.com/users/itsachen/following{/other_user}","gists_url":"https://api.github.com/users/itsachen/gists{/gist_id}","starred_url":"https://api.github.com/users/itsachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsachen/subscriptions","organizations_url":"https://api.github.com/users/itsachen/orgs","repos_url":"https://api.github.com/users/itsachen/repos","events_url":"https://api.github.com/users/itsachen/events{/privacy}","received_events_url":"https://api.github.com/users/itsachen/received_events","type":"User","site_admin":false},"assignees":[{"login":"itsachen","id":666310,"avatar_url":"https://avatars2.githubusercontent.com/u/666310?v=3","gravatar_id":"","url":"https://api.github.com/users/itsachen","html_url":"https://github.com/itsachen","followers_url":"https://api.github.com/users/itsachen/followers","following_url":"https://api.github.com/users/itsachen/following{/other_user}","gists_url":"https://api.github.com/users/itsachen/gists{/gist_id}","starred_url":"https://api.github.com/users/itsachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsachen/subscriptions","organizations_url":"https://api.github.com/users/itsachen/orgs","repos_url":"https://api.github.com/users/itsachen/repos","events_url":"https://api.github.com/users/itsachen/events{/privacy}","received_events_url":"https://api.github.com/users/itsachen/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10/commits","review_comments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10/comments","review_comment_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/10/comments","statuses_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/statuses/3b8ac28bcfef3167c0cc9837dd03d38a928cac46","head":{"label":"tranthibaokhanh:association-endpoint","ref":"association-endpoint","sha":"3b8ac28bcfef3167c0cc9837dd03d38a928cac46","user":{"login":"tranthibaokhanh","id":9032603,"avatar_url":"https://avatars3.githubusercontent.com/u/9032603?v=3","gravatar_id":"","url":"https://api.github.com/users/tranthibaokhanh","html_url":"https://github.com/tranthibaokhanh","followers_url":"https://api.github.com/users/tranthibaokhanh/followers","following_url":"https://api.github.com/users/tranthibaokhanh/following{/other_user}","gists_url":"https://api.github.com/users/tranthibaokhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/tranthibaokhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranthibaokhanh/subscriptions","organizations_url":"https://api.github.com/users/tranthibaokhanh/orgs","repos_url":"https://api.github.com/users/tranthibaokhanh/repos","events_url":"https://api.github.com/users/tranthibaokhanh/events{/privacy}","received_events_url":"https://api.github.com/users/tranthibaokhanh/received_events","type":"User","site_admin":false},"repo":{"id":92219361,"name":"sfmovies","full_name":"tranthibaokhanh/sfmovies","owner":{"login":"tranthibaokhanh","id":9032603,"avatar_url":"https://avatars3.githubusercontent.com/u/9032603?v=3","gravatar_id":"","url":"https://api.github.com/users/tranthibaokhanh","html_url":"https://github.com/tranthibaokhanh","followers_url":"https://api.github.com/users/tranthibaokhanh/followers","following_url":"https://api.github.com/users/tranthibaokhanh/following{/other_user}","gists_url":"https://api.github.com/users/tranthibaokhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/tranthibaokhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranthibaokhanh/subscriptions","organizations_url":"https://api.github.com/users/tranthibaokhanh/orgs","repos_url":"https://api.github.com/users/tranthibaokhanh/repos","events_url":"https://api.github.com/users/tranthibaokhanh/events{/privacy}","received_events_url":"https://api.github.com/users/tranthibaokhanh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tranthibaokhanh/sfmovies","description":"Node Build Your Own API project. Miyagi training","fork":false,"url":"https://api.github.com/repos/tranthibaokhanh/sfmovies","forks_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/forks","keys_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/teams","hooks_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/hooks","issue_events_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/events{/number}","events_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/events","assignees_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/assignees{/user}","branches_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/branches{/branch}","tags_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/tags","blobs_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/refs{/sha}","trees_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/statuses/{sha}","languages_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/languages","stargazers_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/stargazers","contributors_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/contributors","subscribers_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/subscribers","subscription_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/subscription","commits_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/commits{/sha}","git_commits_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/commits{/sha}","comments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/comments{/number}","issue_comment_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/comments{/number}","contents_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/contents/{+path}","compare_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/merges","archive_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/downloads","issues_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues{/number}","pulls_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls{/number}","milestones_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/milestones{/number}","notifications_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/labels{/name}","releases_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/releases{/id}","deployments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/deployments","created_at":"2017-05-23T20:53:50Z","updated_at":"2017-05-30T18:42:27Z","pushed_at":"2017-05-31T18:48:26Z","git_url":"git://github.com/tranthibaokhanh/sfmovies.git","ssh_url":"git@github.com:tranthibaokhanh/sfmovies.git","clone_url":"https://github.com/tranthibaokhanh/sfmovies.git","svn_url":"https://github.com/tranthibaokhanh/sfmovies","homepage":"","size":50,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"tranthibaokhanh:master","ref":"master","sha":"000044a0a912195b39cc63257a2211b13eec238f","user":{"login":"tranthibaokhanh","id":9032603,"avatar_url":"https://avatars3.githubusercontent.com/u/9032603?v=3","gravatar_id":"","url":"https://api.github.com/users/tranthibaokhanh","html_url":"https://github.com/tranthibaokhanh","followers_url":"https://api.github.com/users/tranthibaokhanh/followers","following_url":"https://api.github.com/users/tranthibaokhanh/following{/other_user}","gists_url":"https://api.github.com/users/tranthibaokhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/tranthibaokhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranthibaokhanh/subscriptions","organizations_url":"https://api.github.com/users/tranthibaokhanh/orgs","repos_url":"https://api.github.com/users/tranthibaokhanh/repos","events_url":"https://api.github.com/users/tranthibaokhanh/events{/privacy}","received_events_url":"https://api.github.com/users/tranthibaokhanh/received_events","type":"User","site_admin":false},"repo":{"id":92219361,"name":"sfmovies","full_name":"tranthibaokhanh/sfmovies","owner":{"login":"tranthibaokhanh","id":9032603,"avatar_url":"https://avatars3.githubusercontent.com/u/9032603?v=3","gravatar_id":"","url":"https://api.github.com/users/tranthibaokhanh","html_url":"https://github.com/tranthibaokhanh","followers_url":"https://api.github.com/users/tranthibaokhanh/followers","following_url":"https://api.github.com/users/tranthibaokhanh/following{/other_user}","gists_url":"https://api.github.com/users/tranthibaokhanh/gists{/gist_id}","starred_url":"https://api.github.com/users/tranthibaokhanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranthibaokhanh/subscriptions","organizations_url":"https://api.github.com/users/tranthibaokhanh/orgs","repos_url":"https://api.github.com/users/tranthibaokhanh/repos","events_url":"https://api.github.com/users/tranthibaokhanh/events{/privacy}","received_events_url":"https://api.github.com/users/tranthibaokhanh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tranthibaokhanh/sfmovies","description":"Node Build Your Own API project. Miyagi training","fork":false,"url":"https://api.github.com/repos/tranthibaokhanh/sfmovies","forks_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/forks","keys_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/teams","hooks_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/hooks","issue_events_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/events{/number}","events_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/events","assignees_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/assignees{/user}","branches_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/branches{/branch}","tags_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/tags","blobs_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/refs{/sha}","trees_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/statuses/{sha}","languages_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/languages","stargazers_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/stargazers","contributors_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/contributors","subscribers_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/subscribers","subscription_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/subscription","commits_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/commits{/sha}","git_commits_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/git/commits{/sha}","comments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/comments{/number}","issue_comment_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/comments{/number}","contents_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/contents/{+path}","compare_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/merges","archive_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/downloads","issues_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues{/number}","pulls_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls{/number}","milestones_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/milestones{/number}","notifications_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/labels{/name}","releases_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/releases{/id}","deployments_url":"https://api.github.com/repos/tranthibaokhanh/sfmovies/deployments","created_at":"2017-05-23T20:53:50Z","updated_at":"2017-05-30T18:42:27Z","pushed_at":"2017-05-31T18:48:26Z","git_url":"git://github.com/tranthibaokhanh/sfmovies.git","ssh_url":"git@github.com:tranthibaokhanh/sfmovies.git","clone_url":"https://github.com/tranthibaokhanh/sfmovies.git","svn_url":"https://github.com/tranthibaokhanh/sfmovies","homepage":"","size":50,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10"},"html":{"href":"https://github.com/tranthibaokhanh/sfmovies/pull/10"},"issue":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/10"},"comments":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/tranthibaokhanh/sfmovies/statuses/3b8ac28bcfef3167c0cc9837dd03d38a928cac46"}}}}
{"actor":{"display_login":"itsachen"}}