1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

Update automation context to simplify applying snippet context

This commit is contained in:
Andrew Kingston 2024-03-13 09:15:33 +00:00
parent 20f4c5a77d
commit 70821182fe

View file

@ -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
)
}