chore: Promise all leftovers from complex selects
This commit is contained in:
parent
6ede7fab90
commit
686dc3e992
1 changed files with 25 additions and 30 deletions
|
|
@ -36,9 +36,7 @@ function batch({
|
||||||
simplified,
|
simplified,
|
||||||
}) {
|
}) {
|
||||||
const isCsvExport = _.isBoolean(simplified)
|
const isCsvExport = _.isBoolean(simplified)
|
||||||
return (
|
return getTransactionList(
|
||||||
Promise.all([
|
|
||||||
getTransactionList(
|
|
||||||
{
|
{
|
||||||
from,
|
from,
|
||||||
until,
|
until,
|
||||||
|
|
@ -52,10 +50,8 @@ function batch({
|
||||||
excludeTestingCustomers,
|
excludeTestingCustomers,
|
||||||
},
|
},
|
||||||
{ limit, offset },
|
{ limit, offset },
|
||||||
),
|
)
|
||||||
])
|
.then(addProfits)
|
||||||
// Promise.all(promises)
|
|
||||||
.then(it => addProfits(it[0]))
|
|
||||||
.then(res =>
|
.then(res =>
|
||||||
!isCsvExport
|
!isCsvExport
|
||||||
? res
|
? res
|
||||||
|
|
@ -66,7 +62,6 @@ function batch({
|
||||||
? simplifiedBatch(res)
|
? simplifiedBatch(res)
|
||||||
: advancedBatch(res),
|
: advancedBatch(res),
|
||||||
)
|
)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function advancedBatch(data) {
|
function advancedBatch(data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue