Handled proper endpoint naming

This commit is contained in:
Nedim Uka
2018-11-19 12:35:04 +01:00
parent 752df56d4a
commit f56377f606
3 changed files with 15 additions and 8 deletions

View File

@@ -325,13 +325,13 @@ export const setSupportMessage = (message) => ({
supportText: message
});
export const sendSupportMail = (orderInfo, orderPackages, supportText) => {
export const sendSupportMail = (orderInfo, orderPackages, support_text) => {
let id = orderInfo.id;
return dispatch => {
return htmlClient.fetch({
url: `${API_SERVER}/wp-json/wiaas/support/sendSupportMail`,
url: `${API_SERVER}/wp-json/wiaas/support/send-support-email`,
method: 'post',
data: {id, supportText}
data: {id, support_text}
})
.then(response => {
if (typeof response.data !== 'undefined' && 'messages' in response.data) {