diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index aae345c981..85aa341935 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -326,7 +326,11 @@ class MongoIntegration implements IntegrationBase { } } - async aggregate(query: { json: object; steps: any[]; extra: { [key: string]: string } }) { + async aggregate(query: { + json: object + steps: any[] + extra: { [key: string]: string } + }) { try { await this.connect() const db = this.client.db(this.config.db) @@ -344,9 +348,7 @@ class MongoIntegration implements IntegrationBase { } } else { const stages: Array = query.json as Array - for await (const doc of collection.aggregate( - stages ? stages : [] - )) { + for await (const doc of collection.aggregate(stages ? stages : [])) { response.push(doc) } }