replace order count

This commit is contained in:
olivermrbl
2021-06-07 22:22:35 +02:00
parent 77a84af35c
commit 1edee26e7b

View File

@@ -248,7 +248,8 @@ class OrderService extends BaseService {
query.relations = relations
}
const [raw, count] = await orderRepo.findAndCount(query)
const raw = await orderRepo.findWithRelations(query.relations, query)
const count = await orderRepo.count(query)
const orders = raw.map(r => this.decorateTotals_(r, totalsToSelect))
return [orders, count]