get the info for security challenge

This commit is contained in:
Rimian Perkins 2017-03-29 14:29:07 +11:00
parent ed9c847669
commit 191a973688
1 changed files with 15 additions and 12 deletions

View File

@ -65,19 +65,22 @@ export default Ember.Component.extend({
self.set('transactionInProgress', false); self.set('transactionInProgress', false);
} }
else { else {
if(data.status == 'succeeded') {
let params = { ajax('/users/hp', { method: 'get' }).then(data => {
let params = Ember.assign(data, {
email: self.get('email'), email: self.get('email'),
username: self.get('username'), username: self.get('username'),
name: self.get('name'), name: self.get('name'),
password: self.get('password') password: self.get('password')
}; });
ajax('/users', { data: params, method: 'post' }).then(data => { ajax('/users', { data: params, method: 'post' }).then(data => {
self.set('success', data.success); self.set('success', data.success);
self.set('transactionInProgress', false); self.set('transactionInProgress', false);
self.set('result', self.get('result') + data.message); self.set('result', self.get('result') + data.message);
}); });
});
}
} }
}); });
} }