Merge branch 'develop' into account-api-tests
This commit is contained in:
commit
97dc7fa6a4
|
@ -157,7 +157,7 @@ export async function preview(ctx: any) {
|
||||||
}
|
}
|
||||||
const runFn = () => Runner.run(inputs)
|
const runFn = () => Runner.run(inputs)
|
||||||
|
|
||||||
const { rows, keys, info, extra } = await quotas.addQuery(runFn, {
|
const { rows, keys, info, extra } = await quotas.addQuery<any>(runFn, {
|
||||||
datasourceId: datasource._id,
|
datasourceId: datasource._id,
|
||||||
})
|
})
|
||||||
const schemaFields: any = {}
|
const schemaFields: any = {}
|
||||||
|
@ -246,9 +246,12 @@ async function execute(
|
||||||
}
|
}
|
||||||
const runFn = () => Runner.run(inputs)
|
const runFn = () => Runner.run(inputs)
|
||||||
|
|
||||||
const { rows, pagination, extra, info } = await quotas.addQuery(runFn, {
|
const { rows, pagination, extra, info } = await quotas.addQuery<any>(
|
||||||
datasourceId: datasource._id,
|
runFn,
|
||||||
})
|
{
|
||||||
|
datasourceId: datasource._id,
|
||||||
|
}
|
||||||
|
)
|
||||||
// remove the raw from execution incase transformer being used to hide data
|
// remove the raw from execution incase transformer being used to hide data
|
||||||
if (extra?.raw) {
|
if (extra?.raw) {
|
||||||
delete extra.raw
|
delete extra.raw
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function patch(ctx: any): Promise<any> {
|
||||||
return save(ctx)
|
return save(ctx)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const { row, table } = await quotas.addQuery(
|
const { row, table } = await quotas.addQuery<any>(
|
||||||
() => pickApi(tableId).patch(ctx),
|
() => pickApi(tableId).patch(ctx),
|
||||||
{
|
{
|
||||||
datasourceId: tableId,
|
datasourceId: tableId,
|
||||||
|
@ -104,7 +104,7 @@ export async function destroy(ctx: any) {
|
||||||
const tableId = utils.getTableId(ctx)
|
const tableId = utils.getTableId(ctx)
|
||||||
let response, row
|
let response, row
|
||||||
if (inputs.rows) {
|
if (inputs.rows) {
|
||||||
let { rows } = await quotas.addQuery(
|
let { rows } = await quotas.addQuery<any>(
|
||||||
() => pickApi(tableId).bulkDestroy(ctx),
|
() => pickApi(tableId).bulkDestroy(ctx),
|
||||||
{
|
{
|
||||||
datasourceId: tableId,
|
datasourceId: tableId,
|
||||||
|
@ -117,7 +117,7 @@ export async function destroy(ctx: any) {
|
||||||
gridSocket?.emitRowDeletion(ctx, row._id)
|
gridSocket?.emitRowDeletion(ctx, row._id)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let resp = await quotas.addQuery(() => pickApi(tableId).destroy(ctx), {
|
let resp = await quotas.addQuery<any>(() => pickApi(tableId).destroy(ctx), {
|
||||||
datasourceId: tableId,
|
datasourceId: tableId,
|
||||||
})
|
})
|
||||||
await quotas.removeRow()
|
await quotas.removeRow()
|
||||||
|
|
Loading…
Reference in New Issue