1
0
Fork 0
mirror of synced 2024-07-07 07:15:43 +12:00

Add info to query result payload (#10291)

This commit is contained in:
melohagan 2023-04-24 12:03:02 +01:00 committed by GitHub
parent 5f883ec42c
commit 5e76a50b0b

View file

@ -245,7 +245,7 @@ async function execute(
}
const runFn = () => Runner.run(inputs)
const { rows, pagination, extra } = await quotas.addQuery(runFn, {
const { rows, pagination, extra, info } = await quotas.addQuery(runFn, {
datasourceId: datasource._id,
})
// remove the raw from execution incase transformer being used to hide data
@ -255,7 +255,7 @@ async function execute(
if (opts && opts.rowsOnly) {
ctx.body = rows
} else {
ctx.body = { data: rows, pagination, ...extra }
ctx.body = { data: rows, pagination, ...extra, ...info }
}
} catch (err) {
ctx.throw(400, err)