From b684f9773eebd2135cc78df6cf94b5c1ba5f179a Mon Sep 17 00:00:00 2001 From: walsh9 Date: Thu, 9 Mar 2017 17:48:47 -0500 Subject: [PATCH] pass response along --- app/controllers/profile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/profile.js b/app/controllers/profile.js index 3094a9891..bdfd8e6ac 100644 --- a/app/controllers/profile.js +++ b/app/controllers/profile.js @@ -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],