{"action":"created","comment":{"url":"https://api.github.com/repos/FindEarth/api/pulls/comments/89865171","pull_request_review_id":10396478,"id":89865171,"diff_hunk":"@@ -80,23 +80,25 @@ function updateUserById(req, res, next) {\n   req.logger.info('Updating user with id %s', id);\n \n   const userProfile = {\n-    role         : req.body.role,\n-    organization : req.body.organization,\n-    firstName    : req.body.firstName,\n-    lastName     : req.body.lastName,\n-    avatarUrl    : req.body.avatarUrl\n+    role         : req.body.profile.role,\n+    organization : req.body.profile.organization,\n+    firstName    : req.body.profile.firstName,\n+    lastName     : req.body.profile.lastName,\n+    avatarUrl    : req.body.profile.avatarUrl\n   };\n-\n-  delete req.body.role;\n-  delete req.body.organization;\n+  const userData = {\n+    name: req.body.name\n+  };\n+  delete req.body.profile.role;\n+  delete req.body.profile.organization;\n \n   req.auth0.management.users\n-    .update({ id }, req.body)\n+    .updateAppMetadata({ id: req.body.profile.auth0 }, userData )","path":"route/user.js","position":26,"original_position":26,"commit_id":"0bcfa580e4029bcb265bcbe9b02e11d7172e79a5","original_commit_id":"0bcfa580e4029bcb265bcbe9b02e11d7172e79a5","user":{"login":"ianaya89","id":3258966,"avatar_url":"https://avatars.githubusercontent.com/u/3258966?v=3","gravatar_id":"","url":"https://api.github.com/users/ianaya89","html_url":"https://github.com/ianaya89","followers_url":"https://api.github.com/users/ianaya89/followers","following_url":"https://api.github.com/users/ianaya89/following{/other_user}","gists_url":"https://api.github.com/users/ianaya89/gists{/gist_id}","starred_url":"https://api.github.com/users/ianaya89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianaya89/subscriptions","organizations_url":"https://api.github.com/users/ianaya89/orgs","repos_url":"https://api.github.com/users/ianaya89/repos","events_url":"https://api.github.com/users/ianaya89/events{/privacy}","received_events_url":"https://api.github.com/users/ianaya89/received_events","type":"User","site_admin":false},"body":"why not just `id` ?","created_at":"2016-11-28T19:40:02Z","updated_at":"2016-11-28T19:40:03Z","html_url":"https://github.com/FindEarth/api/pull/66#discussion_r89865171","pull_request_url":"https://api.github.com/repos/FindEarth/api/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/FindEarth/api/pulls/comments/89865171"},"html":{"href":"https://github.com/FindEarth/api/pull/66#discussion_r89865171"},"pull_request":{"href":"https://api.github.com/repos/FindEarth/api/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/FindEarth/api/pulls/66","id":95552332,"html_url":"https://github.com/FindEarth/api/pull/66","diff_url":"https://github.com/FindEarth/api/pull/66.diff","patch_url":"https://github.com/FindEarth/api/pull/66.patch","issue_url":"https://api.github.com/repos/FindEarth/api/issues/66","number":66,"state":"open","locked":false,"title":"updating user data in auth0","user":{"login":"brianstanley","id":1711851,"avatar_url":"https://avatars.githubusercontent.com/u/1711851?v=3","gravatar_id":"","url":"https://api.github.com/users/brianstanley","html_url":"https://github.com/brianstanley","followers_url":"https://api.github.com/users/brianstanley/followers","following_url":"https://api.github.com/users/brianstanley/following{/other_user}","gists_url":"https://api.github.com/users/brianstanley/gists{/gist_id}","starred_url":"https://api.github.com/users/brianstanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianstanley/subscriptions","organizations_url":"https://api.github.com/users/brianstanley/orgs","repos_url":"https://api.github.com/users/brianstanley/repos","events_url":"https://api.github.com/users/brianstanley/events{/privacy}","received_events_url":"https://api.github.com/users/brianstanley/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-28T18:29:58Z","updated_at":"2016-11-28T19:41:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"349135180aaf9fc839a5f7107ce8b6338c151065","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/FindEarth/api/pulls/66/commits","review_comments_url":"https://api.github.com/repos/FindEarth/api/pulls/66/comments","review_comment_url":"https://api.github.com/repos/FindEarth/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FindEarth/api/issues/66/comments","statuses_url":"https://api.github.com/repos/FindEarth/api/statuses/0bcfa580e4029bcb265bcbe9b02e11d7172e79a5","head":{"label":"FindEarth:issue-65","ref":"issue-65","sha":"0bcfa580e4029bcb265bcbe9b02e11d7172e79a5","user":{"login":"FindEarth","id":19509447,"avatar_url":"https://avatars.githubusercontent.com/u/19509447?v=3","gravatar_id":"","url":"https://api.github.com/users/FindEarth","html_url":"https://github.com/FindEarth","followers_url":"https://api.github.com/users/FindEarth/followers","following_url":"https://api.github.com/users/FindEarth/following{/other_user}","gists_url":"https://api.github.com/users/FindEarth/gists{/gist_id}","starred_url":"https://api.github.com/users/FindEarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FindEarth/subscriptions","organizations_url":"https://api.github.com/users/FindEarth/orgs","repos_url":"https://api.github.com/users/FindEarth/repos","events_url":"https://api.github.com/users/FindEarth/events{/privacy}","received_events_url":"https://api.github.com/users/FindEarth/received_events","type":"Organization","site_admin":false},"repo":{"id":53757536,"name":"api","full_name":"FindEarth/api","owner":{"login":"FindEarth","id":19509447,"avatar_url":"https://avatars.githubusercontent.com/u/19509447?v=3","gravatar_id":"","url":"https://api.github.com/users/FindEarth","html_url":"https://github.com/FindEarth","followers_url":"https://api.github.com/users/FindEarth/followers","following_url":"https://api.github.com/users/FindEarth/following{/other_user}","gists_url":"https://api.github.com/users/FindEarth/gists{/gist_id}","starred_url":"https://api.github.com/users/FindEarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FindEarth/subscriptions","organizations_url":"https://api.github.com/users/FindEarth/orgs","repos_url":"https://api.github.com/users/FindEarth/repos","events_url":"https://api.github.com/users/FindEarth/events{/privacy}","received_events_url":"https://api.github.com/users/FindEarth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FindEarth/api","description":":telescope:  API to store, expose, and notify about missing people to help find them","fork":false,"url":"https://api.github.com/repos/FindEarth/api","forks_url":"https://api.github.com/repos/FindEarth/api/forks","keys_url":"https://api.github.com/repos/FindEarth/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FindEarth/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FindEarth/api/teams","hooks_url":"https://api.github.com/repos/FindEarth/api/hooks","issue_events_url":"https://api.github.com/repos/FindEarth/api/issues/events{/number}","events_url":"https://api.github.com/repos/FindEarth/api/events","assignees_url":"https://api.github.com/repos/FindEarth/api/assignees{/user}","branches_url":"https://api.github.com/repos/FindEarth/api/branches{/branch}","tags_url":"https://api.github.com/repos/FindEarth/api/tags","blobs_url":"https://api.github.com/repos/FindEarth/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FindEarth/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FindEarth/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/FindEarth/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FindEarth/api/statuses/{sha}","languages_url":"https://api.github.com/repos/FindEarth/api/languages","stargazers_url":"https://api.github.com/repos/FindEarth/api/stargazers","contributors_url":"https://api.github.com/repos/FindEarth/api/contributors","subscribers_url":"https://api.github.com/repos/FindEarth/api/subscribers","subscription_url":"https://api.github.com/repos/FindEarth/api/subscription","commits_url":"https://api.github.com/repos/FindEarth/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/FindEarth/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/FindEarth/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/FindEarth/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/FindEarth/api/contents/{+path}","compare_url":"https://api.github.com/repos/FindEarth/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FindEarth/api/merges","archive_url":"https://api.github.com/repos/FindEarth/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FindEarth/api/downloads","issues_url":"https://api.github.com/repos/FindEarth/api/issues{/number}","pulls_url":"https://api.github.com/repos/FindEarth/api/pulls{/number}","milestones_url":"https://api.github.com/repos/FindEarth/api/milestones{/number}","notifications_url":"https://api.github.com/repos/FindEarth/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FindEarth/api/labels{/name}","releases_url":"https://api.github.com/repos/FindEarth/api/releases{/id}","deployments_url":"https://api.github.com/repos/FindEarth/api/deployments","created_at":"2016-03-12T23:01:31Z","updated_at":"2016-10-26T19:25:51Z","pushed_at":"2016-11-28T18:29:59Z","git_url":"git://github.com/FindEarth/api.git","ssh_url":"git@github.com:FindEarth/api.git","clone_url":"https://github.com/FindEarth/api.git","svn_url":"https://github.com/FindEarth/api","homepage":"https://alerta-solidaria.herokuapp.com","size":197,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"develop"}},"base":{"label":"FindEarth:develop","ref":"develop","sha":"6cfd4b187e1488d45a90804ae5f44ba00456526c","user":{"login":"FindEarth","id":19509447,"avatar_url":"https://avatars.githubusercontent.com/u/19509447?v=3","gravatar_id":"","url":"https://api.github.com/users/FindEarth","html_url":"https://github.com/FindEarth","followers_url":"https://api.github.com/users/FindEarth/followers","following_url":"https://api.github.com/users/FindEarth/following{/other_user}","gists_url":"https://api.github.com/users/FindEarth/gists{/gist_id}","starred_url":"https://api.github.com/users/FindEarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FindEarth/subscriptions","organizations_url":"https://api.github.com/users/FindEarth/orgs","repos_url":"https://api.github.com/users/FindEarth/repos","events_url":"https://api.github.com/users/FindEarth/events{/privacy}","received_events_url":"https://api.github.com/users/FindEarth/received_events","type":"Organization","site_admin":false},"repo":{"id":53757536,"name":"api","full_name":"FindEarth/api","owner":{"login":"FindEarth","id":19509447,"avatar_url":"https://avatars.githubusercontent.com/u/19509447?v=3","gravatar_id":"","url":"https://api.github.com/users/FindEarth","html_url":"https://github.com/FindEarth","followers_url":"https://api.github.com/users/FindEarth/followers","following_url":"https://api.github.com/users/FindEarth/following{/other_user}","gists_url":"https://api.github.com/users/FindEarth/gists{/gist_id}","starred_url":"https://api.github.com/users/FindEarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FindEarth/subscriptions","organizations_url":"https://api.github.com/users/FindEarth/orgs","repos_url":"https://api.github.com/users/FindEarth/repos","events_url":"https://api.github.com/users/FindEarth/events{/privacy}","received_events_url":"https://api.github.com/users/FindEarth/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FindEarth/api","description":":telescope:  API to store, expose, and notify about missing people to help find them","fork":false,"url":"https://api.github.com/repos/FindEarth/api","forks_url":"https://api.github.com/repos/FindEarth/api/forks","keys_url":"https://api.github.com/repos/FindEarth/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FindEarth/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FindEarth/api/teams","hooks_url":"https://api.github.com/repos/FindEarth/api/hooks","issue_events_url":"https://api.github.com/repos/FindEarth/api/issues/events{/number}","events_url":"https://api.github.com/repos/FindEarth/api/events","assignees_url":"https://api.github.com/repos/FindEarth/api/assignees{/user}","branches_url":"https://api.github.com/repos/FindEarth/api/branches{/branch}","tags_url":"https://api.github.com/repos/FindEarth/api/tags","blobs_url":"https://api.github.com/repos/FindEarth/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FindEarth/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FindEarth/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/FindEarth/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FindEarth/api/statuses/{sha}","languages_url":"https://api.github.com/repos/FindEarth/api/languages","stargazers_url":"https://api.github.com/repos/FindEarth/api/stargazers","contributors_url":"https://api.github.com/repos/FindEarth/api/contributors","subscribers_url":"https://api.github.com/repos/FindEarth/api/subscribers","subscription_url":"https://api.github.com/repos/FindEarth/api/subscription","commits_url":"https://api.github.com/repos/FindEarth/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/FindEarth/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/FindEarth/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/FindEarth/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/FindEarth/api/contents/{+path}","compare_url":"https://api.github.com/repos/FindEarth/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FindEarth/api/merges","archive_url":"https://api.github.com/repos/FindEarth/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FindEarth/api/downloads","issues_url":"https://api.github.com/repos/FindEarth/api/issues{/number}","pulls_url":"https://api.github.com/repos/FindEarth/api/pulls{/number}","milestones_url":"https://api.github.com/repos/FindEarth/api/milestones{/number}","notifications_url":"https://api.github.com/repos/FindEarth/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FindEarth/api/labels{/name}","releases_url":"https://api.github.com/repos/FindEarth/api/releases{/id}","deployments_url":"https://api.github.com/repos/FindEarth/api/deployments","created_at":"2016-03-12T23:01:31Z","updated_at":"2016-10-26T19:25:51Z","pushed_at":"2016-11-28T18:29:59Z","git_url":"git://github.com/FindEarth/api.git","ssh_url":"git@github.com:FindEarth/api.git","clone_url":"https://github.com/FindEarth/api.git","svn_url":"https://github.com/FindEarth/api","homepage":"https://alerta-solidaria.herokuapp.com","size":197,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/FindEarth/api/pulls/66"},"html":{"href":"https://github.com/FindEarth/api/pull/66"},"issue":{"href":"https://api.github.com/repos/FindEarth/api/issues/66"},"comments":{"href":"https://api.github.com/repos/FindEarth/api/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/FindEarth/api/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/FindEarth/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FindEarth/api/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/FindEarth/api/statuses/0bcfa580e4029bcb265bcbe9b02e11d7172e79a5"}}}}
{"actor":{"display_login":"ianaya89"}}