Browse Source

fix(nocodb): fix test hook flag

pull/5349/head
Wing-Kam Wong 2 years 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, newData,
user, user,
testFilters = null, testFilters = null,
throwErrorOnFailure = false throwErrorOnFailure = false,
testHook = false
) { ) {
let hookLog: HookLogType; let hookLog: HookLogType;
const startTime = process.hrtime(); const startTime = process.hrtime();
@ -413,7 +414,7 @@ export async function invokeWebhook(
hookLog.execution_time = parseHrtimeToMilliSeconds( hookLog.execution_time = parseHrtimeToMilliSeconds(
process.hrtime(startTime) 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, data,
user, user,
(hook as any)?.filters, (hook as any)?.filters,
true,
true true
); );
} catch (e) { } catch (e) {

Loading…
Cancel
Save