chore: Promise all leftovers from complex selects

This commit is contained in:
Rafael Taranto 2025-06-24 12:19:47 +01:00
parent 6ede7fab90
commit 686dc3e992

View file

@ -36,9 +36,7 @@ function batch({
simplified,
}) {
const isCsvExport = _.isBoolean(simplified)
return (
Promise.all([
getTransactionList(
return getTransactionList(
{
from,
until,
@ -52,10 +50,8 @@ function batch({
excludeTestingCustomers,
},
{ limit, offset },
),
])
// Promise.all(promises)
.then(it => addProfits(it[0]))
)
.then(addProfits)
.then(res =>
!isCsvExport
? res
@ -66,7 +62,6 @@ function batch({
? simplifiedBatch(res)
: advancedBatch(res),
)
)
}
function advancedBatch(data) {