Update automation context to simplify applying snippet context
This commit is contained in:
parent
20f4c5a77d
commit
70821182fe
|
@ -122,17 +122,14 @@ export async function doInAutomationContext<T>(params: {
|
|||
automationId: string
|
||||
task: () => T
|
||||
}): Promise<T> {
|
||||
const tenantId = getTenantIDFromAppID(params.appId)
|
||||
await ensureSnippetContext()
|
||||
return newContext(
|
||||
{
|
||||
tenantId,
|
||||
tenantId: getTenantIDFromAppID(params.appId),
|
||||
appId: params.appId,
|
||||
automationId: params.automationId,
|
||||
},
|
||||
async () => {
|
||||
await ensureSnippetContext()
|
||||
return await params.task()
|
||||
}
|
||||
params.task
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue