add isAutomation to object
This commit is contained in:
parent
4bf9dda4d6
commit
218abe39cc
|
@ -168,7 +168,7 @@ export async function preview(ctx: any) {
|
||||||
|
|
||||||
async function execute(
|
async function execute(
|
||||||
ctx: any,
|
ctx: any,
|
||||||
opts = { rowsOnly: false, isAutomation: false }
|
opts: any = { rowsOnly: false, isAutomation: false }
|
||||||
) {
|
) {
|
||||||
const db = getAppDB()
|
const db = getAppDB()
|
||||||
|
|
||||||
|
@ -219,10 +219,13 @@ async function execute(
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function executeV1(ctx: any) {
|
export async function executeV1(ctx: any) {
|
||||||
return execute(ctx, { rowsOnly: true, isAutomation: false })
|
return execute(ctx, { rowsOnly: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function executeV2(ctx: any, isAutomation?: any) {
|
export async function executeV2(
|
||||||
|
ctx: any,
|
||||||
|
{ isAutomation }: { isAutomation?: boolean } = {}
|
||||||
|
) {
|
||||||
return execute(ctx, { rowsOnly: false, isAutomation })
|
return execute(ctx, { rowsOnly: false, isAutomation })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,9 +71,8 @@ exports.run = async function ({ inputs, appId, emitter }) {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const isAutomation = true
|
|
||||||
try {
|
try {
|
||||||
await queryController.executeV2(ctx, isAutomation)
|
await queryController.executeV2(ctx, { isAutomation: true })
|
||||||
const { data, ...rest } = ctx.body
|
const { data, ...rest } = ctx.body
|
||||||
return {
|
return {
|
||||||
response: data,
|
response: data,
|
||||||
|
|
Loading…
Reference in New Issue