From 5e76a50b0b3c9f41562066cc95d7a820a63e1f25 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:03:02 +0100 Subject: [PATCH] Add info to query result payload (#10291) --- packages/server/src/api/controllers/query/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/query/index.ts b/packages/server/src/api/controllers/query/index.ts index 91e7f01afa..356a2eb5c0 100644 --- a/packages/server/src/api/controllers/query/index.ts +++ b/packages/server/src/api/controllers/query/index.ts @@ -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)