Browse Source

refactor: remove unused rowID (it is in body)

pull/5444/head
Wing-Kam Wong 2 years 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') @Acl('commentRow')
async commentRow(@Request() req) { async commentRow(@Request() req) {
return await this.auditsService.commentRow({ return await this.auditsService.commentRow({
// todo: correct this
rowId: req.params.rowId ?? req.query.rowId,
user: (req as any).user, user: (req as any).user,
body: req.body, body: req.body,
}); });

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

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

Loading…
Cancel
Save