Browse Source

feat(nocodb): check hook.active before invoke webhook

pull/5317/head
Wing-Kam Wong 2 years ago
parent
commit
a05c19310d
  1. 4
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

4
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

@ -2247,8 +2247,6 @@ class BaseModelSqlv2 {
}
private async handleHooks(hookName, data, req): Promise<void> {
// const data = _data;
const view = await View.get(this.viewId);
// handle form view data submission
@ -2329,8 +2327,10 @@ class BaseModelSqlv2 {
operation,
});
for (const hook of hooks) {
if (hook.active) {
invokeWebhook(hook, this.model, data, req?.user);
}
}
} catch (e) {
console.log('hooks :: error', hookName, e);
}

Loading…
Cancel
Save