Browse Source

fix: OldData - dataList

pull/5444/head
Wing-Kam Wong 2 years ago committed by Pranav C
parent
commit
b4d484471a
  1. 15
      packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts
  2. 2
      packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts

15
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.controller.ts

@ -25,8 +25,19 @@ export class OldDatasController {
@Get('/nc/:projectId/api/v1/:tableName') @Get('/nc/:projectId/api/v1/:tableName')
@Acl('dataList') @Acl('dataList')
async dataList(@Request() req, @Response() res) { async dataList(
res.json(await this.oldDatasService.getDataList(req)); @Request() req,
@Response() res,
@Param('projectId') projectId: string,
@Param('tableName') tableName: string,
) {
res.json(
await this.oldDatasService.dataList({
query: req.query,
projectId: projectId,
tableName: tableName,
}),
);
} }
@Get('/nc/:projectId/api/v1/:tableName/count') @Get('/nc/:projectId/api/v1/:tableName/count')

2
packages/nocodb-nest/src/modules/datas/old-datas/old-datas.service.ts

@ -16,7 +16,7 @@ import { nocoExecute } from 'nc-help';
@Injectable() @Injectable()
export class OldDatasService { export class OldDatasService {
async getDataList(param: OldPathParams & { query: any }) { async dataList(param: OldPathParams & { query: any }) {
const { model, view } = await this.getViewAndModelFromRequest(param); const { model, view } = await this.getViewAndModelFromRequest(param);
const base = await Base.get(model.base_id); const base = await Base.get(model.base_id);

Loading…
Cancel
Save