snake case - camel case transformations

This commit is contained in:
Bilal Catic
2018-09-19 17:42:03 +02:00
parent 0787cf834f
commit 393158808a
3 changed files with 36 additions and 4 deletions

View File

@@ -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 => {