Browse Source

refactor: remove unused rowID (it is in body)

pull/5444/head
Wing-Kam Wong 1 year ago
parent
commit
2789847aa9
  1. 2
      packages/nocodb-nest/src/controllers/audits.controller.ts
  2. 6
      packages/nocodb-nest/src/services/audits.service.ts

2
packages/nocodb-nest/src/controllers/audits.controller.ts

@ -30,8 +30,6 @@ export class AuditsController {
@Acl('commentRow')
async commentRow(@Request() req) {
return await this.auditsService.commentRow({
// todo: correct this
rowId: req.params.rowId ?? req.query.rowId,
user: (req as any).user,
body: req.body,
});

6
packages/nocodb-nest/src/services/audits.service.ts

@ -8,11 +8,7 @@ import type { AuditRowUpdateReqType, CommentUpdateReqType } from 'nocodb-sdk';
@Injectable()
export class AuditsService {
async commentRow(param: {
rowId: string;
body: AuditRowUpdateReqType;
user: any;
}) {
async commentRow(param: { body: AuditRowUpdateReqType; user: any }) {
validatePayload('swagger.json#/components/schemas/CommentReq', param.body);
return await Audit.insert({

Loading…
Cancel
Save