end transaction when email is empty

This commit is contained in:
Rimian Perkins 2017-04-04 13:25:51 +10:00
parent 3fa6130f23
commit 4a2f13f32c
1 changed files with 4 additions and 2 deletions

View File

@ -58,9 +58,8 @@ export default Ember.Component.extend({
ajax('/users', { data: params, method: 'post' }).then(data => { ajax('/users', { data: params, method: 'post' }).then(data => {
self.setSuccess(); self.setSuccess();
self.endTranscation();
self.set('result', self.get('result') + data.message); self.set('result', self.get('result') + data.message);
self.endTranscation();
}); });
}); });
}, },
@ -97,6 +96,9 @@ export default Ember.Component.extend({
if(data.status == 'succeeded') { if(data.status == 'succeeded') {
this.createUser(); this.createUser();
} }
else {
self.endTranscation();
}
} }
}); });
} }