Skip to content

Commit

Permalink
chore(condo): DOMA-7004 rid of Bigjs at property dataloader
Browse files Browse the repository at this point in the history
  • Loading branch information
sitozzz committed Sep 11, 2023
1 parent b03dd38 commit 1482618
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const Big = require('big.js')

const { AbstractDataLoader } = require('@condo/domains/analytics/utils/services/dataLoaders/AbstractDataLoader')
const { GqlWithKnexLoadList } = require('@condo/domains/common/utils/serverSchema')

Expand All @@ -17,7 +15,7 @@ class PropertyDataLoader extends AbstractDataLoader {
const propertyIds = await propertyUnitDataLoader.load()
const result = await propertyUnitDataLoader.loadAggregate('SUM("unitsCount")', propertyIds.map(({ id }) => id))

return { sum: new Big(result.sum || 0).toFixed(0) }
return { sum: result.sum || 0 }
}
}

Expand Down

0 comments on commit 1482618

Please sign in to comment.