add challenge values to params

This commit is contained in:
Rimian Perkins 2017-03-29 15:26:34 +11:00
parent 191a973688
commit 5f4be82278
1 changed files with 5 additions and 3 deletions

View File

@ -67,12 +67,14 @@ export default Ember.Component.extend({
else {
if(data.status == 'succeeded') {
ajax('/users/hp', { method: 'get' }).then(data => {
let params = Ember.assign(data, {
let params = {
email: self.get('email'),
username: self.get('username'),
name: self.get('name'),
password: self.get('password')
});
password: self.get('password'),
password_confirmation: data.value,
challenge: data.challenge.split('').reverse().join(''),
};
ajax('/users', { data: params, method: 'post' }).then(data => {
self.set('success', data.success);