Skip to content

Commit

Permalink
Merge pull request #91 from nypublicradio/mwalsh/WE-6752_password-cha…
Browse files Browse the repository at this point in the history
…nge-errors

pass error response along when changing password
  • Loading branch information
walsh9 authored Apr 11, 2017
2 parents 07065ce + b684f97 commit 70557f0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/controllers/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,18 @@ export default Controller.extend({
})
.then(response => {
if (response.ok) {
resolve();
resolve(response);
this.showFlash('password');
} else if (response.json) {
response.json().then(reject);
} else {
reject();
reject(response);
}
});
});
});
},

showFlash(type) {
this.get('flashMessages').add({
message: FLASH_MESSAGES[type],
Expand Down

0 comments on commit 70557f0

Please sign in to comment.