hotfix(medusa): Decorate order on customers

This commit is contained in:
olivermrbl
2020-12-08 14:59:33 +01:00
parent de7c98c9a6
commit 89830421c8

View File

@@ -18,6 +18,12 @@ export default async (req, res) => {
customer.orders = await orderService.list({ customer_id: customer._id })
customer.orders = await Promise.all(
customer.orders.map(order => {
return orderService.decorate(order, ["total", "payment_status"], [])
})
)
res.json({ customer })
} catch (err) {
throw err