Skip to content

Commit

Permalink
EDF: [premieroctet#128] fix generate order returned type
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Dec 19, 2024
1 parent b8a2185 commit 8500f14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/web/server/plugins/entreprisedufutur/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
2 changes: 2 additions & 0 deletions studio-test/src/dependencies/utils/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,7 @@ return Promise.allSettled(imagePromises)
nb_tickets
}
return axios.post(url, body)
.then(res => ({value: res.data}))
},

validate_order: ({value}) => {
Expand All @@ -1220,5 +1221,6 @@ return Promise.allSettled(imagePromises)
value: value?._id,
}
return axios.post(url, body)
.then(res => ({value: res.data}))
},
}
2 changes: 2 additions & 0 deletions studio/src/dependencies/utils/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,7 @@ return Promise.allSettled(imagePromises)
nb_tickets
}
return axios.post(url, body)
.then(res => ({value: res.data}))
},

validate_order: ({value}) => {
Expand All @@ -1220,5 +1221,6 @@ return Promise.allSettled(imagePromises)
value: value?._id,
}
return axios.post(url, body)
.then(res => ({value: res.data}))
},
}

0 comments on commit 8500f14

Please sign in to comment.