1
0
Fork 0
mirror of synced 2024-07-01 04:21:06 +12:00

quick fix for paging and making deletion work correctly.

This commit is contained in:
mike12345567 2021-06-17 17:08:12 +01:00
parent 8b4fc45efe
commit ab6a4391d9

View file

@ -35,6 +35,7 @@ function outputProcessing(rows, table) {
}
row._id = generateRowIdField(idParts)
row.tableId = table._id
row._rev = "rev"
}
return rows
}
@ -176,7 +177,6 @@ exports.bulkDestroy = async ctx => {
const appId = ctx.appId
const { rows } = ctx.request.body
const tableId = ctx.params.tableId
// TODO: this can probably be optimised to a single SQL statement in the future
let promises = []
for (let row of rows) {
promises.push(
@ -232,7 +232,7 @@ exports.search = async ctx => {
sort,
paginate: {
limit: 1,
page: bookmark + 1,
page: (bookmark * limit) + 1,
}
})
hasNextPage = nextRows.length > 0