From db20a6d9a4eeea177580552c8ceb27a7ab3460a9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 11 Apr 2023 13:43:07 +0800 Subject: [PATCH] fix: OldData - dataRead --- .../src/modules/datas/old-datas/old-datas.controller.ts | 9 ++++++++- .../src/modules/datas/old-datas/old-datas.service.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts index b0df6b30d0..d3bac8d934 100644 --- a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts +++ b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts @@ -85,7 +85,14 @@ export class OldDatasController { @Param('tableName') tableName: string, @Param('rowId') rowId: string, ) { - res.json(await this.oldDatasService.dataRead(req)); + res.json( + await this.oldDatasService.dataRead({ + projectId: projectId, + tableName: tableName, + rowId: rowId, + query: req.query, + }), + ); } @Patch('/nc/:projectId/api/v1/:tableName/:rowId') diff --git a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts index 026b48150b..55729dd759 100644 --- a/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts +++ b/packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts @@ -94,7 +94,7 @@ export class OldDatasService { return await nocoExecute( ast, - await baseModel.readByPk(param.params.rowId), + await baseModel.readByPk(param.rowId), {}, {}, );