merge
This commit is contained in:
parent
3eaaff9901
commit
d52d7b8484
|
@ -123,9 +123,11 @@ exports.bulkDestroy = async ctx => {
|
||||||
// TODO: this can probably be optimised to a single SQL statement in the future
|
// TODO: this can probably be optimised to a single SQL statement in the future
|
||||||
let promises = []
|
let promises = []
|
||||||
for (let row of rows) {
|
for (let row of rows) {
|
||||||
promises.push(handleRequest(appId, DataSourceOperation.DELETE, tableId, {
|
promises.push(
|
||||||
id: row._id,
|
handleRequest(appId, DataSourceOperation.DELETE, tableId, {
|
||||||
}))
|
id: row._id,
|
||||||
|
})
|
||||||
|
)
|
||||||
}
|
}
|
||||||
await Promise.all(promises)
|
await Promise.all(promises)
|
||||||
ctx.body = { response: { ok: true }, rows }
|
ctx.body = { response: { ok: true }, rows }
|
||||||
|
|
Loading…
Reference in New Issue