Browse Source

feat(nocodb): add handleHooks to afterBulkInsert

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
7a25fc04c0
  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

@ -1954,7 +1954,7 @@ class BaseModelSqlv2 {
chunkSize
);
await this.afterBulkInsert(insertDatas, this.dbDriver, cookie);
await this.afterBulkInsert(response, this.dbDriver, cookie);
return response;
} catch (e) {
@ -2175,6 +2175,8 @@ class BaseModelSqlv2 {
}
public async afterBulkInsert(data: any[], _trx: any, req): Promise<void> {
await this.handleHooks('After.insert', null, data, req);
await Audit.insert({
fk_model_id: this.model.id,
op_type: AuditOperationTypes.DATA,

Loading…
Cancel
Save