Browse Source

fix: OldData - dataUpdate

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

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

@ -109,7 +109,8 @@ export class OldDatasController {
projectId: projectId, projectId: projectId,
tableName: tableName, tableName: tableName,
body: req.body, body: req.body,
rowId, cookie: req,
rowId: rowId,
}), }),
); );
} }

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

@ -100,7 +100,9 @@ export class OldDatasService {
); );
} }
async dataUpdate(param: OldPathParams & { body: unknown; rowId: string }) { async dataUpdate(
param: OldPathParams & { body: unknown; cookie: any; rowId: string },
) {
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);
@ -110,7 +112,12 @@ export class OldDatasService {
dbDriver: await NcConnectionMgrv2.get(base), dbDriver: await NcConnectionMgrv2.get(base),
}); });
return await baseModel.updateByPk(param.rowId, param.body, null, param); return await baseModel.updateByPk(
param.rowId,
param.body,
null,
param.cookie,
);
} }
async dataDelete(param: OldPathParams & { rowId: string; cookie: any }) { async dataDelete(param: OldPathParams & { rowId: string; cookie: any }) {

Loading…
Cancel
Save