diff --git a/packages/nocodb/src/lib/services/audit.svc.ts b/packages/nocodb/src/lib/services/audit.svc.ts index fe1c48db7c..c4d140fafe 100644 --- a/packages/nocodb/src/lib/services/audit.svc.ts +++ b/packages/nocodb/src/lib/services/audit.svc.ts @@ -3,7 +3,7 @@ import DOMPurify from 'isomorphic-dompurify'; import { validatePayload } from '../meta/api/helpers'; import Audit from '../models/Audit'; import Model from '../models/Model'; -import type { AuditRowUpdateReqType } from 'nocodb-sdk'; +import type { AuditRowUpdateReqType, CommentUpdateReqType } from 'nocodb-sdk'; export async function commentRow(param: { rowId: string; @@ -62,3 +62,15 @@ export async function commentsCount(param: { ids: param.ids as string[], }); } + +export async function commentUpdate(param: { + auditId: string; + body: CommentUpdateReqType; +}) { + validatePayload( + 'swagger.json#/components/schemas/CommentUpdateReq', + param.body + ); + + return await Audit.commentUpdate(param.auditId, param.body); +}