lint
This commit is contained in:
parent
dbf58fcfe9
commit
9a5b3b27aa
|
@ -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 {
|
try {
|
||||||
await this.connect()
|
await this.connect()
|
||||||
const db = this.client.db(this.config.db)
|
const db = this.client.db(this.config.db)
|
||||||
|
@ -344,9 +348,7 @@ class MongoIntegration implements IntegrationBase {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const stages: Array<any> = query.json as Array<any>
|
const stages: Array<any> = query.json as Array<any>
|
||||||
for await (const doc of collection.aggregate(
|
for await (const doc of collection.aggregate(stages ? stages : [])) {
|
||||||
stages ? stages : []
|
|
||||||
)) {
|
|
||||||
response.push(doc)
|
response.push(doc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue