Browse Source

fix(nc-gui): Row -> Record

pull/6624/head
Muhammed Mustafa 1 year ago
parent
commit
fa6b93eb5c
  1. 4
      packages/nocodb/src/services/data-table.service.ts
  2. 10
      packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts

4
packages/nocodb/src/services/data-table.service.ts

@ -247,7 +247,7 @@ export class DataTableService {
.join('___'); .join('___');
// if duplicate then throw error // if duplicate then throw error
if (keys.has(pk)) { if (keys.has(pk)) {
NcError.unprocessableEntity('Duplicate row with id ' + pk); NcError.unprocessableEntity('Duplicate record with id ' + pk);
} }
if (pk === undefined || pk === null) { if (pk === undefined || pk === null) {
@ -274,7 +274,7 @@ export class DataTableService {
}); });
if (!(await baseModel.exist(param.rowId))) { if (!(await baseModel.exist(param.rowId))) {
NcError.notFound(`Row with id '${param.rowId}' not found`); NcError.notFound(`Record with id '${param.rowId}' not found`);
} }
const column = await this.getColumn(param); const column = await this.getColumn(param);

10
packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts

@ -2262,7 +2262,7 @@ function linkBased() {
...validParams, ...validParams,
urlParams: { ...validParams.urlParams, rowId: 9999 }, urlParams: { ...validParams.urlParams, rowId: 9999 },
status: 404, status: 404,
msg: "Row with id '9999' not found", msg: "Record with id '9999' not found",
}); });
// Body parameter error // Body parameter error
@ -2334,7 +2334,7 @@ function linkBased() {
...validParams, ...validParams,
urlParams: { ...validParams.urlParams, rowId: 9999 }, urlParams: { ...validParams.urlParams, rowId: 9999 },
status: 404, status: 404,
msg: "Row with id '9999' not found", msg: "Record with id '9999' not found",
}); });
// Body parameter error // Body parameter error
@ -2406,7 +2406,7 @@ function linkBased() {
...validParams, ...validParams,
urlParams: { ...validParams.urlParams, rowId: 9999 }, urlParams: { ...validParams.urlParams, rowId: 9999 },
status: 404, status: 404,
msg: "Row with id '9999' not found", msg: "Record with id '9999' not found",
}); });
// Query parameter error // Query parameter error
@ -2432,7 +2432,9 @@ function linkBased() {
// Link List: Invalid query parameter - offset > total records // Link List: Invalid query parameter - offset > total records
if (debugMode) if (debugMode)
console.log('Link List: Invalid query parameter - offset > total records'); console.log(
'Link List: Invalid query parameter - offset > total records',
);
await ncAxiosLinkGet({ await ncAxiosLinkGet({
...validParams, ...validParams,
query: { ...validParams.query, offset: 9999 }, query: { ...validParams.query, offset: 9999 },

Loading…
Cancel
Save