{"action":"closed","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/160","repository_url":"https://api.github.com/repos/ga-wdi-boston/game-project","labels_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/160/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/game-project/issues/160/events","html_url":"https://github.com/ga-wdi-boston/game-project/issues/160","id":146786948,"number":160,"title":"Undefined id when updating password","user":{"login":"susandaiute","id":16547482,"avatar_url":"https://avatars.githubusercontent.com/u/16547482?v=3","gravatar_id":"","url":"https://api.github.com/users/susandaiute","html_url":"https://github.com/susandaiute","followers_url":"https://api.github.com/users/susandaiute/followers","following_url":"https://api.github.com/users/susandaiute/following{/other_user}","gists_url":"https://api.github.com/users/susandaiute/gists{/gist_id}","starred_url":"https://api.github.com/users/susandaiute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/susandaiute/subscriptions","organizations_url":"https://api.github.com/users/susandaiute/orgs","repos_url":"https://api.github.com/users/susandaiute/repos","events_url":"https://api.github.com/users/susandaiute/events{/privacy}","received_events_url":"https://api.github.com/users/susandaiute/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2016-04-08T01:32:50Z","updated_at":"2016-04-08T02:20:39Z","closed_at":"2016-04-08T02:20:39Z","body":"When I go to update a password I get the error:\r\napi.js:44 Uncaught TypeError: Cannot read property 'id' of undefinedupdatePassword @ api.js:44(anonymous function) @ events.js:27jQuery.event.dispatch @ jquery.js:4737elemData.handle @ jquery.js:4549\r\n2client?cd17:25 [WDS] App updated. Recompiling...\r\n\r\nRelevant code: \r\n```javascript\r\n\r\nconst updatePassword = (updateSuccess, failure, data) => {\r\nconsole.log(app);\r\nlet form = {\r\n  \"passwords\": {\r\n    \"old\": data.credentials.oldpassword,\r\n    \"new\": data.credentials.newpassword\r\n  }\r\n};\r\n$.ajax({\r\n  method : 'PATCH',\r\n  url: app.api + '/change-password/' + app.user.id,\r\n  data: form,\r\n  headers: {\r\n    Authorization: 'Token token=' + app.user.token,\r\n  },\r\n}).done(updateSuccess)\r\n.fail(failure);\r\nconsole.log('patch ran');\r\n};\r\n```\r\n\r\nLine 44 of api.js is :\r\n\r\n```javascript\r\nurl: app.api + '/change-password/' + app.user.id,\r\n```"}}