Browse Source

feat(nocodb): add id to hook samplePayload

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
97600cf41c
  1. 2
      packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts

2
packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts

@ -1,4 +1,5 @@
import { RelationTypes, UITypes } from 'nocodb-sdk'; import { RelationTypes, UITypes } from 'nocodb-sdk';
import { v4 as uuidv4 } from 'uuid';
import View from '../../models/View'; import View from '../../models/View';
import Column from '../../models/Column'; import Column from '../../models/Column';
import Model from '../../models/Model'; import Model from '../../models/Model';
@ -31,6 +32,7 @@ export default async function populateSamplePayload(
const samplePayload = { const samplePayload = {
type: `${scope}.after.${operation}`, type: `${scope}.after.${operation}`,
id: uuidv4(),
data: { data: {
table_id: model.id, table_id: model.id,
table_name: model.title, table_name: model.title,

Loading…
Cancel
Save