diff --git a/backend/web/server/plugins/entreprisedufutur/actions.js b/backend/web/server/plugins/entreprisedufutur/actions.js index d37dc7826..b1277485c 100644 --- a/backend/web/server/plugins/entreprisedufutur/actions.js +++ b/backend/web/server/plugins/entreprisedufutur/actions.js @@ -176,7 +176,7 @@ const generateOrder = async ({value,nb_tickets}, user) => { await OrderTicket.create({order: order._id, status}) } } - return order._id + return order } addAction('generate_order', generateOrder) @@ -242,7 +242,7 @@ const validateOrder = async ({value}, user) => { //order status update await Order.findByIdAndUpdate(order._id, {status: ORDER_STATUS_VALIDATED}) - return value + return order } addAction('validate_order', validateOrder) diff --git a/studio-test/src/dependencies/utils/actions.js b/studio-test/src/dependencies/utils/actions.js index 53730a8c0..5edfb293a 100644 --- a/studio-test/src/dependencies/utils/actions.js +++ b/studio-test/src/dependencies/utils/actions.js @@ -1211,6 +1211,7 @@ return Promise.allSettled(imagePromises) nb_tickets } return axios.post(url, body) + .then(res => ({value: res.data})) }, validate_order: ({value}) => { @@ -1220,5 +1221,6 @@ return Promise.allSettled(imagePromises) value: value?._id, } return axios.post(url, body) + .then(res => ({value: res.data})) }, } diff --git a/studio/src/dependencies/utils/actions.js b/studio/src/dependencies/utils/actions.js index 53730a8c0..5edfb293a 100644 --- a/studio/src/dependencies/utils/actions.js +++ b/studio/src/dependencies/utils/actions.js @@ -1211,6 +1211,7 @@ return Promise.allSettled(imagePromises) nb_tickets } return axios.post(url, body) + .then(res => ({value: res.data})) }, validate_order: ({value}) => { @@ -1220,5 +1221,6 @@ return Promise.allSettled(imagePromises) value: value?._id, } return axios.post(url, body) + .then(res => ({value: res.data})) }, }