replace order count

This commit is contained in:
olivermrbl committed 2021-06-07 22:22:35 +02:00
1 parent 77a84af35c
commit 1edee26e7b
1 file changed
+2 -1
+2 -1
View File
@@ -248,7 +248,8 @@ class OrderService extends BaseService {
query.relations = relations 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)) const orders = raw.map(r => this.decorateTotals_(r, totalsToSelect))
return [orders, count] return [orders, count]