snake case - camel case transformations
This commit is contained in:
@@ -13,6 +13,7 @@ import {updateMessages} from '../notification/notificationActions';
|
||||
import {setDialogOpenFlag} from '../dialog/dialogActions';
|
||||
import {recieveProfileInfo} from './profileSettingsActions';
|
||||
import { fromWiaasProfileInfo } from '../../helpers/ProfileHelper';
|
||||
import { toWiaasAddress } from '../../helpers/AddressHelper';
|
||||
|
||||
const client = new HtmlClient();
|
||||
|
||||
@@ -27,7 +28,7 @@ export const saveProfileAddress = (idUser, profileAddress) => {
|
||||
url: `${API_SERVER}/wp-json/wiaas/customer/${idUser}/profile-addresses`,
|
||||
method: 'put',
|
||||
data: {
|
||||
'profile_address': JSON.stringify(profileAddress)
|
||||
'profile_address': JSON.stringify(toWiaasAddress(profileAddress))
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -80,7 +81,7 @@ export const saveBillingAddress = (idUser, billingAddress) => {
|
||||
url: `${API_SERVER}/wp-json/wiaas/customer/${idUser}/billing-addresses`,
|
||||
method: 'put',
|
||||
data: {
|
||||
'billing_address': JSON.stringify(billingAddress)
|
||||
'billing_address': JSON.stringify(toWiaasAddress(billingAddress))
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
Reference in New Issue
Block a user