Clean code

This commit is contained in:
Adria Navarro 2024-10-23 12:22:07 +02:00
parent 713500febb
commit 1f01277ee8
1 changed files with 2 additions and 7 deletions

View File

@ -248,13 +248,8 @@ export async function run(
throw new HTTPError("Table not found", 404)
}
const rowActions = await getAll(tableId)
const rowAction = rowActions?.actions[rowActionId]
if (!rowAction) {
throw new HTTPError("Row action not found", 404)
}
const automation = await sdk.automations.get(rowAction.automationId)
const { automationId } = await get(tableId, rowActionId)
const automation = await sdk.automations.get(automationId)
const row = await sdk.rows.find(tableId, rowId)
await triggers.externalTrigger(