Browse Source

feat(nocodb): enrich deleted_rows

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
40470703fe
  1. 8
      packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts

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

@ -146,8 +146,12 @@ export function constructWebHookData(hook, model, view, prevData, newData) {
table_name: model.title, table_name: model.title,
view_id: view.id, view_id: view.id,
view_name: view.title, view_name: view.title,
...(prevData && { previous_rows: prevData }), ...(prevData && {
rows: [newData], [hook.operation === 'delete' ? 'deleted_rows' : 'previous_rows']: [
prevData,
],
}),
...(newData && { rows: [newData] }),
}, },
}; };
} }

Loading…
Cancel
Save