-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
@martinlevesque : might require few adjustement as inquirer handle input validation in a different way. |
modules/auth.js
Outdated
return apiRequest.post('account/register', { | ||
account: { | ||
email, | ||
password, | ||
password_confirmation, | ||
passwordConfirmation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be changed to:
password_confirmation: passwordConfirmation,
the variable name is important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I got it right. you mean the variable name ?
I might have missed something as the var name could be anything ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's currently calling the api to register an account with:
{
account: {
...
passwordConfirmation,
...
}
}
but the API looks for:
{
account: {
...
password_confirmation,
...
}
}
and so to fix it:
{
account: {
...
password_confirmation: passwordConfirmation,
...
}
}
modules/auth.js
Outdated
choices: ['y', 'n'], | ||
default: 'y' | ||
}] | ||
const result = await inquirer.prompt(schema) | ||
return new Promise((resolve, reject) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this return by (and remove the new Promise(...)):
return result.wantsNewsletter === 'y' ? 1 : 0
thanks for your contribution, the UI is good. |
@martinlevesque : ok got it. PR updated. |
No description provided.