hotfix(medusa): Customer orders decoration

This commit is contained in:
olivermrbl
2020-12-04 08:37:50 +01:00
parent 911be9fa57
commit 37dfd5b6f8

View File

@@ -16,10 +16,7 @@ export default async (req, res) => {
[]
)
customer.orders = await Promise.all(customer.orders.map(async oId => {
const order = await orderService.retrieve(oId)
return orderService.decorate(order, [], [])
}))
customer.orders = await orderService.list({ customer_id: customer._id })
res.json({ customer })
} catch (err) {