hotfix(medusa): Customer orders decoration
This commit is contained in:
1 parent
911be9fa57
commit
37dfd5b6f8
1 file changed
+1
-4
@@ -16,10 +16,7 @@ export default async (req, res) => {
|
|||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
|
|
||||||
customer.orders = await Promise.all(customer.orders.map(async oId => {
|
customer.orders = await orderService.list({ customer_id: customer._id })
|
||||||
const order = await orderService.retrieve(oId)
|
|
||||||
return orderService.decorate(order, [], [])
|
|
||||||
}))
|
|
||||||
|
|
||||||
res.json({ customer })
|
res.json({ customer })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in new issue
Block a user