Skip to content

Commit c6d366c

Browse files
committed
Correction of import of async/mapLimit; Corection of type and indentation
1 parent ab5cdc9 commit c6d366c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/platformApi/PlatformApiLogicClient.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { mapLimit } from 'async/mapLimit';
1+
import mapLimit from 'async/mapLimit';
22
import { PlatformApiRestClient } from './PlatformApiRestClient';
33

44
async function sleep(amount) { await new Promise(r => setTimeout(r, amount)); }
@@ -147,10 +147,10 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
147147
const workspaces = await this.fetchWorkspaceList({});
148148
if (!workspaceId) {
149149
const nonFlatFlows = await mapLimit(workspaces, realSplitFactor,
150-
async workspace => this.fetchAllFlowsForWorkspace({
151-
parallelCalls: parallelizationPerTask,
152-
workspaceId: workspace.workspaceId,
153-
}));
150+
async workspace => this.fetchAllFlowsForWorkspace({
151+
parallelCalls: parallelizationPerTask,
152+
workspaceId: workspace.workspaceId,
153+
}));
154154
flows = nonFlatFlows.flat();
155155
} else {
156156
flows = await this.fetchAllFlowsForWorkspace({
@@ -508,7 +508,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
508508
method: 'GET',
509509
url: `/data-samples/${sampleId}`,
510510
});
511-
} catch (e) {
511+
} catch (e: any) {
512512
throw new Error(`Can't extract data sample with id: ${sampleId}. Error: ${e.message}`);
513513
}
514514
const sample = sampleRequest.data.attributes;
@@ -521,7 +521,7 @@ export class PlatformApiLogicClient extends PlatformApiRestClient {
521521
/* eslint-disable-next-line no-param-reassign */
522522
soFar[sample.sampleId] = sample.sample;
523523
return soFar;
524-
}, {});
524+
}, {});
525525
flow.attributes.graph.nodes
526526
.filter(node => node.selected_data_samples)
527527
.forEach((node) => {

0 commit comments

Comments
 (0)