handle order actions
This commit is contained in:
@@ -36,7 +36,7 @@ export const fetchCustomerQuestionnaires = (idOrder) => {
|
||||
return dispatch => {
|
||||
dispatch(requestCustomerQuestionnaires());
|
||||
return htmlClient.fetch({
|
||||
url: `${API_SERVER}/wp-json/wiaas/customer-questionnaires/${idOrder}`,
|
||||
url: `${API_SERVER}/wp-json/wiaas/delivery/${idOrder}/customer-questionnaires`,
|
||||
method: 'get'
|
||||
})
|
||||
.then(response => {
|
||||
@@ -55,7 +55,7 @@ export const uploadCustomerQuestionnaire = (orderId, actionId, file) => {
|
||||
return dispatch => {
|
||||
dispatch(uploadCustomerQuestionnaireAction());
|
||||
return htmlClient.uploadFile(file, {
|
||||
url: `${API_SERVER}/wp-json/wiaas/customer-questionnaires/${orderId}/upload/${actionId}`,
|
||||
url: `${API_SERVER}/wp-json/wiaas/delivery/${orderId}/customer-questionnaires/upload/${actionId}`,
|
||||
}).then(response => {
|
||||
if (typeof response.data !== 'undefined') {
|
||||
dispatch(updateMessages(response.data.messages, orderMessages));
|
||||
|
||||
Reference in New Issue
Block a user