hotfix(medusa): Decorate order on customers
This commit is contained in:
1 parent
de7c98c9a6
commit
89830421c8
1 file changed
+6
@@ -18,6 +18,12 @@ export default async (req, res) => {
|
|||||||
|
|
||||||
customer.orders = await orderService.list({ customer_id: customer._id })
|
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 })
|
res.json({ customer })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw err
|
throw err
|
||||||
|
|||||||
Reference in new issue
Block a user