From f0f6c42b3cf4eb45ab89aa1b0bf97fc814910a80 Mon Sep 17 00:00:00 2001 From: dohyeons Date: Mon, 8 Dec 2025 16:49:28 +0900 Subject: [PATCH] =?UTF-8?q?flow-widget=20=EC=9D=B8=EB=9D=BC=EC=9D=B8=20?= =?UTF-8?q?=ED=8E=B8=EC=A7=91=20=EC=8B=9C=20changed=5Fby=EC=97=90=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20ID=20=EA=B8=B0=EB=A1=9D=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend-node/src/services/flowExecutionService.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend-node/src/services/flowExecutionService.ts b/backend-node/src/services/flowExecutionService.ts index 53a181e3..dcaafb5b 100644 --- a/backend-node/src/services/flowExecutionService.ts +++ b/backend-node/src/services/flowExecutionService.ts @@ -360,7 +360,17 @@ export class FlowExecutionService { console.log(`πŸ“ [updateStepData] Query: ${updateQuery}`); console.log(`πŸ“ [updateStepData] Params:`, params); - await db.query(updateQuery, params); + // νŠΈλžœμž­μ…˜μœΌλ‘œ κ°μ‹Έμ„œ μ‚¬μš©μž ID μ„Έμ…˜ λ³€μˆ˜ μ„€μ • ν›„ μ—…λ°μ΄νŠΈ μ‹€ν–‰ + // (νŠΈλ¦¬κ±°μ—μ„œ changed_byλ₯Ό κΈ°λ‘ν•˜κΈ° μœ„ν•¨) + await db.query("BEGIN"); + try { + await db.query(`SET LOCAL app.user_id = '${userId}'`); + await db.query(updateQuery, params); + await db.query("COMMIT"); + } catch (txError) { + await db.query("ROLLBACK"); + throw txError; + } } console.log(`βœ… [updateStepData] Data updated successfully: ${tableName}.${primaryKeyColumn}=${recordId}`, {