{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/comments/63738189","id":63738189,"diff_hunk":"@@ -21,43 +21,51 @@ angular.module('app-bootstrap').controller('UpdateProfController',\n       }\n     }\n \n-    this.upDatePass = (obj) => {\n-      const data2 = {\n-        password: this.updateSubmit.password1\n-      }\n-      profileService.postUpdateProf({ headers }, data2, obj)\n-      .then(() => {\n-        $state.go('log_in');\n-      })\n-      .catch(() => {\n-        alert($translate.instant('CNTR.ERROR'));\n-      })\n-    }\n-\n-    this.updateSubmitt = (isValid) => {\n+    this.updateChanges = (isValid) => {\n       if (isValid) {\n-        const obj = this.updateSubmit.objectId;\n-        if (this.updateSubmit === this.originalSubmit) {\n-          if (this.updateSubmit.password1) {\n-            this.upDatePass(obj);\n+        this.updateSubmit = _.pickBy(this.updateSubmit, (val) => val.length > 0);\n+        delete this.updateSubmit.passwordConf;\n+        profileService.postUpdateProf(this.updateSubmit.sessionToken, this.updateSubmit,\n+                                      this.updateSubmit.objectId)\n+        .then(() => {\n+          if (this.updateSubmit.password) {\n+            logInService.logOutUser(this.updateSubmit.sessionToken)\n+            .then(() => {\n+              $state.go('log_in');\n+            })\n+            .catch(() => {\n+              alert('Error...');","path":"src/app/components/principal/updateProf/updateProfController.js","position":null,"original_position":53,"commit_id":"20229b64bdbc72be9cbbbd4fa888e41570e02d63","original_commit_id":"9a75bd73233a3424f8553f43cbac7b203cd3d6c5","user":{"login":"JISevilla92","id":12797703,"avatar_url":"https://avatars.githubusercontent.com/u/12797703?v=3","gravatar_id":"","url":"https://api.github.com/users/JISevilla92","html_url":"https://github.com/JISevilla92","followers_url":"https://api.github.com/users/JISevilla92/followers","following_url":"https://api.github.com/users/JISevilla92/following{/other_user}","gists_url":"https://api.github.com/users/JISevilla92/gists{/gist_id}","starred_url":"https://api.github.com/users/JISevilla92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JISevilla92/subscriptions","organizations_url":"https://api.github.com/users/JISevilla92/orgs","repos_url":"https://api.github.com/users/JISevilla92/repos","events_url":"https://api.github.com/users/JISevilla92/events{/privacy}","received_events_url":"https://api.github.com/users/JISevilla92/received_events","type":"User","site_admin":false},"body":"I18n! You can create a generic error message to show whenever you don't have a specific message for that error.","created_at":"2016-05-18T16:38:15Z","updated_at":"2016-05-18T16:38:15Z","html_url":"https://github.com/wolox-training/nm-angular/pull/9#discussion_r63738189","pull_request_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/comments/63738189"},"html":{"href":"https://github.com/wolox-training/nm-angular/pull/9#discussion_r63738189"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9","id":70376550,"html_url":"https://github.com/wolox-training/nm-angular/pull/9","diff_url":"https://github.com/wolox-training/nm-angular/pull/9.diff","patch_url":"https://github.com/wolox-training/nm-angular/pull/9.patch","issue_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/9","number":9,"state":"open","locked":false,"title":"Added the functionality of updated profile an name, last name, userna…","user":{"login":"nmartinelli23","id":18533431,"avatar_url":"https://avatars.githubusercontent.com/u/18533431?v=3","gravatar_id":"","url":"https://api.github.com/users/nmartinelli23","html_url":"https://github.com/nmartinelli23","followers_url":"https://api.github.com/users/nmartinelli23/followers","following_url":"https://api.github.com/users/nmartinelli23/following{/other_user}","gists_url":"https://api.github.com/users/nmartinelli23/gists{/gist_id}","starred_url":"https://api.github.com/users/nmartinelli23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmartinelli23/subscriptions","organizations_url":"https://api.github.com/users/nmartinelli23/orgs","repos_url":"https://api.github.com/users/nmartinelli23/repos","events_url":"https://api.github.com/users/nmartinelli23/events{/privacy}","received_events_url":"https://api.github.com/users/nmartinelli23/received_events","type":"User","site_admin":false},"body":"## Summary\r\nIn this branch the update profile view is added. it can:\r\n-upadte the username, firstname and lastName\r\n-change its password\r\n\r\n## Screenshots\r\n\r\n![captura de pantalla de 2016-05-17 11-47-53](https://cloud.githubusercontent.com/assets/18533431/15326656/3bed2592-1c25-11e6-9d52-e3c087e75d6a.png)\r\n\r\n\r\n## Trello Card\r\n\r\nhttps://trello.com/c/GudfkkDm/11-permitir-la-edicion-de-datos-del-usuario\r\n","created_at":"2016-05-17T15:22:03Z","updated_at":"2016-05-18T16:38:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0e24d510d80a0ca7c4c93fc94c3eb3558d3fb70","assignee":{"login":"JISevilla92","id":12797703,"avatar_url":"https://avatars.githubusercontent.com/u/12797703?v=3","gravatar_id":"","url":"https://api.github.com/users/JISevilla92","html_url":"https://github.com/JISevilla92","followers_url":"https://api.github.com/users/JISevilla92/followers","following_url":"https://api.github.com/users/JISevilla92/following{/other_user}","gists_url":"https://api.github.com/users/JISevilla92/gists{/gist_id}","starred_url":"https://api.github.com/users/JISevilla92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JISevilla92/subscriptions","organizations_url":"https://api.github.com/users/JISevilla92/orgs","repos_url":"https://api.github.com/users/JISevilla92/repos","events_url":"https://api.github.com/users/JISevilla92/events{/privacy}","received_events_url":"https://api.github.com/users/JISevilla92/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9/commits","review_comments_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9/comments","review_comment_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/9/comments","statuses_url":"https://api.github.com/repos/wolox-training/nm-angular/statuses/20229b64bdbc72be9cbbbd4fa888e41570e02d63","head":{"label":"wolox-training:profile_update","ref":"profile_update","sha":"20229b64bdbc72be9cbbbd4fa888e41570e02d63","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":56510360,"name":"nm-angular","full_name":"wolox-training/nm-angular","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/nm-angular","description":"Training maquetado y angular.","fork":false,"url":"https://api.github.com/repos/wolox-training/nm-angular","forks_url":"https://api.github.com/repos/wolox-training/nm-angular/forks","keys_url":"https://api.github.com/repos/wolox-training/nm-angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/nm-angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/nm-angular/teams","hooks_url":"https://api.github.com/repos/wolox-training/nm-angular/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/nm-angular/events","assignees_url":"https://api.github.com/repos/wolox-training/nm-angular/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/nm-angular/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/nm-angular/tags","blobs_url":"https://api.github.com/repos/wolox-training/nm-angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/nm-angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/nm-angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/nm-angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/nm-angular/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/nm-angular/languages","stargazers_url":"https://api.github.com/repos/wolox-training/nm-angular/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/nm-angular/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/nm-angular/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/nm-angular/subscription","commits_url":"https://api.github.com/repos/wolox-training/nm-angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/nm-angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/nm-angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/nm-angular/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/nm-angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/nm-angular/merges","archive_url":"https://api.github.com/repos/wolox-training/nm-angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/nm-angular/downloads","issues_url":"https://api.github.com/repos/wolox-training/nm-angular/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/nm-angular/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/nm-angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/nm-angular/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/nm-angular/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/nm-angular/deployments","created_at":"2016-04-18T13:33:06Z","updated_at":"2016-05-02T15:08:50Z","pushed_at":"2016-05-18T16:35:48Z","git_url":"git://github.com/wolox-training/nm-angular.git","ssh_url":"git@github.com:wolox-training/nm-angular.git","clone_url":"https://github.com/wolox-training/nm-angular.git","svn_url":"https://github.com/wolox-training/nm-angular","homepage":"","size":468,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:master","ref":"master","sha":"a93dd2402878e5d008581e40c04b9c0c09da899c","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":56510360,"name":"nm-angular","full_name":"wolox-training/nm-angular","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/nm-angular","description":"Training maquetado y angular.","fork":false,"url":"https://api.github.com/repos/wolox-training/nm-angular","forks_url":"https://api.github.com/repos/wolox-training/nm-angular/forks","keys_url":"https://api.github.com/repos/wolox-training/nm-angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/nm-angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/nm-angular/teams","hooks_url":"https://api.github.com/repos/wolox-training/nm-angular/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/nm-angular/events","assignees_url":"https://api.github.com/repos/wolox-training/nm-angular/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/nm-angular/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/nm-angular/tags","blobs_url":"https://api.github.com/repos/wolox-training/nm-angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/nm-angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/nm-angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/nm-angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/nm-angular/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/nm-angular/languages","stargazers_url":"https://api.github.com/repos/wolox-training/nm-angular/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/nm-angular/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/nm-angular/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/nm-angular/subscription","commits_url":"https://api.github.com/repos/wolox-training/nm-angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/nm-angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/nm-angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/nm-angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/nm-angular/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/nm-angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/nm-angular/merges","archive_url":"https://api.github.com/repos/wolox-training/nm-angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/nm-angular/downloads","issues_url":"https://api.github.com/repos/wolox-training/nm-angular/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/nm-angular/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/nm-angular/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/nm-angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/nm-angular/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/nm-angular/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/nm-angular/deployments","created_at":"2016-04-18T13:33:06Z","updated_at":"2016-05-02T15:08:50Z","pushed_at":"2016-05-18T16:35:48Z","git_url":"git://github.com/wolox-training/nm-angular.git","ssh_url":"git@github.com:wolox-training/nm-angular.git","clone_url":"https://github.com/wolox-training/nm-angular.git","svn_url":"https://github.com/wolox-training/nm-angular","homepage":"","size":468,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9"},"html":{"href":"https://github.com/wolox-training/nm-angular/pull/9"},"issue":{"href":"https://api.github.com/repos/wolox-training/nm-angular/issues/9"},"comments":{"href":"https://api.github.com/repos/wolox-training/nm-angular/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/nm-angular/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/nm-angular/statuses/20229b64bdbc72be9cbbbd4fa888e41570e02d63"}}}}