1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00
This commit is contained in:
Martin McKeaveney 2021-06-15 13:47:08 +01:00
parent 759347c48b
commit 0739e07a5f

View file

@ -123,9 +123,11 @@ exports.bulkDestroy = async ctx => {
// TODO: this can probably be optimised to a single SQL statement in the future
let promises = []
for (let row of rows) {
promises.push(handleRequest(appId, DataSourceOperation.DELETE, tableId, {
id: row._id,
}))
promises.push(
handleRequest(appId, DataSourceOperation.DELETE, tableId, {
id: row._id,
})
)
}
await Promise.all(promises)
ctx.body = { response: { ok: true }, rows }