Browse Source

feat(nocodb): construct hook data based on version

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
267373591f
  1. 5
      packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts

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

@ -136,6 +136,7 @@ export async function validateCondition(filters: Filter[], data: any) {
}
export function constructWebHookData(hook, model, view, prevData, newData) {
if (hook.version === 'v2') {
// extend in the future - currently only support records
const scope = 'records';
@ -157,6 +158,10 @@ export function constructWebHookData(hook, model, view, prevData, newData) {
};
}
// for v1, keep it as it is
return newData;
}
export async function handleHttpWebHook(
hook,
model,

Loading…
Cancel
Save