quick fix for paging and making deletion work correctly.
This commit is contained in:
parent
7f33dd3f0d
commit
562c1eee71
|
@ -35,6 +35,7 @@ function outputProcessing(rows, table) {
|
||||||
}
|
}
|
||||||
row._id = generateRowIdField(idParts)
|
row._id = generateRowIdField(idParts)
|
||||||
row.tableId = table._id
|
row.tableId = table._id
|
||||||
|
row._rev = "rev"
|
||||||
}
|
}
|
||||||
return rows
|
return rows
|
||||||
}
|
}
|
||||||
|
@ -176,7 +177,6 @@ exports.bulkDestroy = async ctx => {
|
||||||
const appId = ctx.appId
|
const appId = ctx.appId
|
||||||
const { rows } = ctx.request.body
|
const { rows } = ctx.request.body
|
||||||
const tableId = ctx.params.tableId
|
const tableId = ctx.params.tableId
|
||||||
// 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(
|
promises.push(
|
||||||
|
@ -232,7 +232,7 @@ exports.search = async ctx => {
|
||||||
sort,
|
sort,
|
||||||
paginate: {
|
paginate: {
|
||||||
limit: 1,
|
limit: 1,
|
||||||
page: bookmark + 1,
|
page: (bookmark * limit) + 1,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
hasNextPage = nextRows.length > 0
|
hasNextPage = nextRows.length > 0
|
||||||
|
|
Loading…
Reference in New Issue