Browse Source

fix(nocodb): fix test hook flag

pull/5349/head
Wing-Kam Wong 1 year ago
parent
commit
4728c65c13
  1. 5
      packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts
  2. 1
      packages/nocodb/src/lib/services/hook.svc.ts

5
packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts

@ -252,7 +252,8 @@ export async function invokeWebhook(
newData,
user,
testFilters = null,
throwErrorOnFailure = false
throwErrorOnFailure = false,
testHook = false
) {
let hookLog: HookLogType;
const startTime = process.hrtime();
@ -413,7 +414,7 @@ export async function invokeWebhook(
hookLog.execution_time = parseHrtimeToMilliSeconds(
process.hrtime(startTime)
);
HookLog.insert({ ...hookLog, test_call: !!testFilters });
HookLog.insert({ ...hookLog, test_call: testHook });
}
}
}

1
packages/nocodb/src/lib/services/hook.svc.ts

@ -96,6 +96,7 @@ export async function hookTest(param: {
data,
user,
(hook as any)?.filters,
true,
true
);
} catch (e) {

Loading…
Cancel
Save