From 437aef222b606f5006f99402817146276daddbaf Mon Sep 17 00:00:00 2001 From: abhishek-hedaoo-sp Date: Thu, 3 Oct 2024 18:22:27 +0530 Subject: [PATCH] Misc changes --- lib/partitionAdapter.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/partitionAdapter.ts b/lib/partitionAdapter.ts index 0410ee1..bae54f5 100644 --- a/lib/partitionAdapter.ts +++ b/lib/partitionAdapter.ts @@ -7,30 +7,30 @@ export interface PartitionedAdapter { } export class Partitioned { - public h; + public partitionAdapter; - constructor(h: PartitionedAdapter) { - this.h = h; + constructor(partitionAdapter: PartitionedAdapter) { + this.partitionAdapter = partitionAdapter; } async handler(context: Context, input: StdAccountListInput, res: Response): Promise { - const config = await readConfig(); const isPatitionEnabled = config.partitionAggregationEnabled; var partitionList: Array | undefined; + // Get the partitions from the connector if (isPatitionEnabled) { - partitionList = await this.h.getPartitions(context, input); + partitionList = await this.partitionAdapter.getPartitions(context, input); } if (!partitionList) { let promises = []; for (const partition of partitionList!) { - promises.push(this.h.list(context, input, res, partition)); + promises.push(this.partitionAdapter.list(context, input, res, partition)); } await Promise.all(promises); } else { - return await this.h.list(context, input, res, undefined); + return await this.partitionAdapter.list(context, input, res, undefined); } } }