From 17189aba95d7d81570bceb99bdfa3d2368c53ba9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 22 Mar 2023 20:22:11 +0800 Subject: [PATCH] feat(nocodb): add commentUpdate --- packages/nocodb/src/lib/models/Audit.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/nocodb/src/lib/models/Audit.ts b/packages/nocodb/src/lib/models/Audit.ts index 4a4a7a4980..f8e2e84bb9 100644 --- a/packages/nocodb/src/lib/models/Audit.ts +++ b/packages/nocodb/src/lib/models/Audit.ts @@ -157,6 +157,7 @@ export default class Audit implements AuditType { offset, }); } + static async projectAuditCount(projectId: string): Promise { return ( await Noco.ncMeta @@ -172,4 +173,19 @@ export default class Audit implements AuditType { fk_model_id, }); } + + static async commentUpdate( + auditId: string, + audit: Partial, + ncMeta = Noco.ncMeta + ) { + const updateObj = extractProps(audit, ['description']); + return await ncMeta.metaUpdate( + null, + null, + MetaTable.AUDIT, + updateObj, + auditId + ); + } }