Change to updated urls for phone verification

This commit is contained in:
Liam Cardenas 2018-01-17 18:22:52 -08:00
parent fa7d265cc0
commit faa2753e35

View file

@ -99,7 +99,7 @@ export function doUserPhoneNew(phone) {
}); });
}; };
Lbryio.call('user_phone', 'new', { phone_number: phone, country_code: 1 }, 'post').then( Lbryio.call('user', 'phone_number_new', { phone_number: phone, country_code: 1 }, 'post').then(
success, success,
failure failure
); );
@ -115,7 +115,7 @@ export function doUserPhoneVerifyFailure(error) {
export function doUserPhoneVerify(verificationCode) { export function doUserPhoneVerify(verificationCode) {
return (dispatch, getState) => { return (dispatch, getState) => {
const phone_number = selectPhoneToVerify(getState()); const phoneNumber = selectPhoneToVerify(getState());
dispatch({ dispatch({
type: ACTIONS.USER_PHONE_VERIFY_STARTED, type: ACTIONS.USER_PHONE_VERIFY_STARTED,
@ -123,19 +123,19 @@ export function doUserPhoneVerify(verificationCode) {
}); });
Lbryio.call( Lbryio.call(
'user_phone', 'user',
'confirm', 'phone_number_confirm',
{ {
verification_code: verificationCode, verification_code: verificationCode,
phone_number, phone_number: phoneNumber,
country_code: '1', country_code: '1',
}, },
'post' 'post'
) )
.then(userEmail => { .then(() => {
dispatch({ dispatch({
type: ACTIONS.USER_PHONE_VERIFY_SUCCESS, type: ACTIONS.USER_PHONE_VERIFY_SUCCESS,
data: { phone_number }, data: { phone_number: phoneNumber },
}); });
dispatch(doUserFetch()); dispatch(doUserFetch());
}) })