I need to pass 2 values to a post request. I have written the call as such
const { phoneNumber, code } = params;
yield call(
apiCall,
Generic.loginSms,
actions.loginSmsLink(phoneNumber, code)
);
the action is as such.
export const loginSmsLink = createAction(
ActionTypes.SMS_CODE_LOGIN,
phoneNumber => ({ phoneNumber }),
code => ({ code })
);
the request:
loginSms: apiCall(({phoneNumber, code}) => ({
method: 'POST',
url: '/login',
data: {
loginAuthenticationToken: {
'@type': 'sms',
phoneNumber,
code
}
}
})),
The request is only accepting the first param of phoneNumber.