From 6afc439ffc37607ba2b8c5ea9609cee1c1befc9f Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 9 Oct 2023 13:53:35 +0000 Subject: [PATCH 1/7] refactor: rename row to record --- .../smartsheet/expanded-form/index.vue | 2 +- packages/nc-gui/composables/useData.ts | 2 +- .../composables/useExpandedFormStore.ts | 2 +- .../nc-gui/composables/useKanbanViewStore.ts | 2 +- packages/nc-gui/composables/useLTARStore.ts | 2 +- packages/nc-gui/lang/en.json | 46 ++++++------- .../src/controllers/data-table.controller.ts | 18 +++--- packages/nocodb/src/db/BaseModelSqlv2.ts | 6 +- .../db/sql-client/lib/mysql/MysqlClient.ts | 2 +- packages/nocodb/src/helpers/PagedResponse.ts | 2 +- packages/nocodb/src/helpers/catchError.ts | 4 +- packages/nocodb/src/schema/swagger.json | 6 +- .../tests/unit/rest/tests/newDataApis.test.ts | 64 +++++++++---------- .../tests/unit/rest/tests/viewRow.test.ts | 2 +- 14 files changed, 80 insertions(+), 80 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/expanded-form/index.vue b/packages/nc-gui/components/smartsheet/expanded-form/index.vue index 1a7559d330..317713e589 100644 --- a/packages/nc-gui/components/smartsheet/expanded-form/index.vue +++ b/packages/nc-gui/components/smartsheet/expanded-form/index.vue @@ -402,7 +402,7 @@ const onDeleteRowClick = () => { const onConfirmDeleteRowClick = async () => { showDeleteRowModal.value = false await deleteRowById(primaryKey.value) - message.success('Row deleted') + message.success('Record deleted') reloadTrigger.trigger() onClose() showDeleteRowModal.value = false diff --git a/packages/nc-gui/composables/useData.ts b/packages/nc-gui/composables/useData.ts index 5c000c786c..fa9c7475ab 100644 --- a/packages/nc-gui/composables/useData.ts +++ b/packages/nc-gui/composables/useData.ts @@ -494,7 +494,7 @@ export function useData(args: { if (res.message) { message.info( - `Row delete failed: ${`Unable to delete row with ID ${id} because of the following: + `Record delete failed: ${`Unable to delete record with ID ${id} because of the following: \n${res.message.join('\n')}.\n Clear the data first & try again`})}`, ) diff --git a/packages/nc-gui/composables/useExpandedFormStore.ts b/packages/nc-gui/composables/useExpandedFormStore.ts index 7dbc90197e..a602a6b1d8 100644 --- a/packages/nc-gui/composables/useExpandedFormStore.ts +++ b/packages/nc-gui/composables/useExpandedFormStore.ts @@ -322,7 +322,7 @@ const [useProvideExpandedFormStore, useExpandedFormStore] = useInjectionState((m if (res.message) { message.info( - `Row delete failed: ${`Unable to delete row with ID ${rowId} because of the following: + `Record delete failed: ${`Unable to delete record with ID ${rowId} because of the following: \n${res.message.join('\n')}.\n Clear the data first & try again`})}`, ) diff --git a/packages/nc-gui/composables/useKanbanViewStore.ts b/packages/nc-gui/composables/useKanbanViewStore.ts index 43fbd3a223..c498e40937 100644 --- a/packages/nc-gui/composables/useKanbanViewStore.ts +++ b/packages/nc-gui/composables/useKanbanViewStore.ts @@ -679,7 +679,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState( if (res.message) { message.info( - `Row delete failed: ${`Unable to delete row with ID ${id} because of the following: + `Record delete failed: ${`Unable to delete record with ID ${id} because of the following: \n${res.message.join('\n')}.\n Clear the data first & try again`})}`, ) diff --git a/packages/nc-gui/composables/useLTARStore.ts b/packages/nc-gui/composables/useLTARStore.ts index 30469cb721..abf2a544e7 100644 --- a/packages/nc-gui/composables/useLTARStore.ts +++ b/packages/nc-gui/composables/useLTARStore.ts @@ -291,7 +291,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState( if (res.message) { message.info( - `Row delete failed: ${`Unable to delete row with ID ${id} because of the following: + `Record delete failed: ${`Unable to delete record with ID ${id} because of the following: \n${res.message.join('\n')}.\n Clear the data first & try again`})}`, ) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index 254c9a9728..ee6fad46e5 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -219,7 +219,7 @@ "orgLevelViewer": "Organization Level Viewer" }, "sqlVIew": "SQL View", - "rowHeight": "Row Height", + "rowHeight": "Record Height", "heightClass": { "short": "Short", "medium": "Medium", @@ -291,11 +291,11 @@ "dateJoined": "Date Joined", "tokenName": "Token name", "inDesktop": "in Desktop", - "rowData": "Row data", + "rowData": "Record data", "creator": "Creator", "qrCode": "QR Code", "termsOfService": "Terms of Service", - "updateSelectedRows": "Update Selected Rows", + "updateSelectedRows": "Update Selected Records", "noFiltersAdded": "No filters added", "editCards": "Edit Cards", "noFieldsFound": "No fields found", @@ -366,7 +366,7 @@ "codeSnippet": "Code Snippet", "keyboardShortcut": "Keyboard Shortcuts", "generateRandomName": "Generate Random Name", - "findRowByScanningCode": "Find row by scanning a QR or Barcode", + "findRowByScanningCode": "Find record by scanning a QR or Barcode", "tokenManagement": "Token Management", "addNewToken": "Add new token", "accountSettings": "Account Settings", @@ -561,7 +561,7 @@ "goToDashboard": "Go to Dashboard", "importing": "Importing", "formatJson": "Format JSON", - "firstRowAsHeaders": "Use First Row as Headers", + "firstRowAsHeaders": "Use First Record as Headers", "flattenNested": "Flatten Nested", "downloadAllowed": "Download allowed", "weAreHiring": "We are Hiring!", @@ -578,8 +578,8 @@ "agreeToTos": "By signing up, you agree to the Terms of Service", "welcomeToNc": "Welcome to NocoDB!", "inviteOnlySignup": "Allow signup only using invite url", - "nextRow": "Next Row", - "prevRow": "Previous Row", + "nextRow": "Next Record", + "prevRow": "Previous Record", "addRowGrid": "Manually add data in grid view", "addRowForm": "Enter record data through a form", "noAccess": "No access", @@ -695,17 +695,17 @@ "deleteTable": "Delete Table", "addField": "Add new field to this table", "setDisplay": "Set as Display value", - "addRow": "Add new row", - "saveRow": "Save row", + "addRow": "Add new record", + "saveRow": "Save record", "saveAndExit": "Save & Exit", "saveAndStay": "Save & Stay", - "insertRow": "Insert new row", - "duplicateRow": "Duplicate row", - "deleteRow": "Delete row", - "deleteRows": "Delete rows", + "insertRow": "Insert new record", + "duplicateRow": "Duplicate record", + "deleteRow": "Delete record", + "deleteRows": "Delete records", "predictColumns": "Predict Columns", "predictFormulas": "Predict Formulas", - "deleteSelectedRow": "Delete selected rows", + "deleteSelectedRow": "Delete selected records", "importExcel": "Import Excel", "importCSV": "Import CSV", "downloadCSV": "Download as CSV", @@ -719,7 +719,7 @@ "changePwd": "Change Password", "createView": "Create a View", "shareView": "Share View", - "findRowByCodeScan": "Find row by scan", + "findRowByCodeScan": "Find record by scan", "fillByCodeScan": "Fill by scan", "listSharedView": "Shared View List", "ListView": "Views List", @@ -974,22 +974,22 @@ }, "codeScanner": { "loadingScanner": "Loading the scanner...", - "selectColumn": "Select a column (QR code or Barcode) that you want to use for finding a row by scanning.", - "moreThanOneRowFoundForCode": "More than one row found for this code. Currently only unique codes are supported.", - "noRowFoundForCode": "No row found for this code for the selected column" + "selectColumn": "Select a column (QR code or Barcode) that you want to use for finding a record by scanning.", + "moreThanOneRowFoundForCode": "More than one record found for this code. Currently only unique codes are supported.", + "noRowFoundForCode": "No record found for this code for the selected column" }, "map": { "overLimit": "You're over the limit.", "closeLimit": "You're getting close to the limit.", "limitNumber": "The limit of markers shown in a Map View is 1000 records." }, - "footerInfo": "Rows per page", + "footerInfo": "Records per page", "upload": "Select file to Upload", "upload_sub": "or drag and drop file", "excelSupport": "Supported: .xls, .xlsx, .xlsm, .ods, .ots", "excelURL": "Enter excel file URL", "csvURL": "Enter CSV file URL", - "footMsg": "# of rows to parse to infer datatype", + "footMsg": "# of records to parse to infer datatype", "excelImport": "sheet(s) are available for import", "exportMetadata": "Do you want to export metadata from meta tables?", "importMetadata": "Do you want to import metadata from meta tables?", @@ -1165,8 +1165,8 @@ "failedToLoadChildrenList": "Failed to load children list", "deleteFailed": "Delete failed", "unlinkFailed": "Unlink failed", - "rowUpdateFailed": "Row update failed", - "deleteRowFailed": "Failed to delete row", + "rowUpdateFailed": "Record update failed", + "deleteRowFailed": "Failed to delete record", "setFormDataFailed": "Failed to set form data", "formViewUpdateFailed": "Failed to update form view", "tableNameRequired": "Table name is required", @@ -1209,7 +1209,7 @@ "success": { "licenseKeyUpdated": "License Key Updated", "columnDuplicated": "Column duplicated successfully", - "rowDuplicatedWithoutSavedYet": "Row duplicated (not saved)", + "rowDuplicatedWithoutSavedYet": "Record duplicated (not saved)", "updatedUIACL": "Updated UI ACL for tables successfully", "pluginUninstalled": "Plugin uninstalled successfully", "pluginSettingsSaved": "Plugin settings saved successfully", diff --git a/packages/nocodb/src/controllers/data-table.controller.ts b/packages/nocodb/src/controllers/data-table.controller.ts index 246e36f86f..8159cdf833 100644 --- a/packages/nocodb/src/controllers/data-table.controller.ts +++ b/packages/nocodb/src/controllers/data-table.controller.ts @@ -24,7 +24,7 @@ export class DataTableController { constructor(private readonly dataTableService: DataTableService) {} // todo: Handle the error case where view doesnt belong to model - @Get('/api/v1/tables/:modelId/rows') + @Get('/api/v1/tables/:modelId/records') @Acl('dataList') async dataList( @Request() req, @@ -43,7 +43,7 @@ export class DataTableController { res.json(responseData); } - @Get(['/api/v1/tables/:modelId/rows/count']) + @Get(['/api/v1/tables/:modelId/records/count']) @Acl('dataCount') async dataCount( @Request() req, @@ -60,7 +60,7 @@ export class DataTableController { res.json(countResult); } - @Post(['/api/v1/tables/:modelId/rows']) + @Post(['/api/v1/tables/:modelId/records']) @HttpCode(200) @Acl('dataInsert') async dataInsert( @@ -77,7 +77,7 @@ export class DataTableController { }); } - @Patch(['/api/v1/tables/:modelId/rows']) + @Patch(['/api/v1/tables/:modelId/records']) @Acl('dataUpdate') async dataUpdate( @Request() req, @@ -93,7 +93,7 @@ export class DataTableController { }); } - @Delete(['/api/v1/tables/:modelId/rows']) + @Delete(['/api/v1/tables/:modelId/records']) @Acl('dataDelete') async dataDelete( @Request() req, @@ -109,7 +109,7 @@ export class DataTableController { }); } - @Get(['/api/v1/tables/:modelId/rows/:rowId']) + @Get(['/api/v1/tables/:modelId/records/:rowId']) @Acl('dataRead') async dataRead( @Request() req, @@ -125,7 +125,7 @@ export class DataTableController { }); } - @Get(['/api/v1/tables/:modelId/links/:columnId/rows/:rowId']) + @Get(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataList') async nestedDataList( @Request() req, @@ -143,7 +143,7 @@ export class DataTableController { }); } - @Post(['/api/v1/tables/:modelId/links/:columnId/rows/:rowId']) + @Post(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataLink') async nestedLink( @Request() req, @@ -164,7 +164,7 @@ export class DataTableController { }); } - @Delete(['/api/v1/tables/:modelId/links/:columnId/rows/:rowId']) + @Delete(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataUnlink') async nestedUnlink( @Request() req, diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 4510f2c468..67a8943ae8 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -4291,7 +4291,7 @@ class BaseModelSqlv2 { // validate rowId if (!row) { - NcError.notFound(`Row with id '${rowId}' not found`); + NcError.notFound(`Record with id '${rowId}' not found`); } if (!childIds.length) return; @@ -4516,7 +4516,7 @@ class BaseModelSqlv2 { // validate rowId if (!row) { - NcError.notFound(`Row with id '${rowId}' not found`); + NcError.notFound(`Record with id '${rowId}' not found`); } if (!childIds.length) return; @@ -4678,7 +4678,7 @@ class BaseModelSqlv2 { // validate rowId if (!row) { - NcError.notFound(`Row with id ${id} not found`); + NcError.notFound(`Record with id ${id} not found`); } const parentCol = await ( diff --git a/packages/nocodb/src/db/sql-client/lib/mysql/MysqlClient.ts b/packages/nocodb/src/db/sql-client/lib/mysql/MysqlClient.ts index b3fbe6d404..4b5726d170 100644 --- a/packages/nocodb/src/db/sql-client/lib/mysql/MysqlClient.ts +++ b/packages/nocodb/src/db/sql-client/lib/mysql/MysqlClient.ts @@ -1936,7 +1936,7 @@ class MysqlClient extends KnexClient { await promisify(jsonfile.writeFile)( seedSettings, { - rows: { value: 8, description: 'Maximum number of rows' }, + rows: { value: 8, description: 'Maximum number of records' }, foreign_key_rows: { value: 2, description: '1:n - Total number foreign key per relation', diff --git a/packages/nocodb/src/helpers/PagedResponse.ts b/packages/nocodb/src/helpers/PagedResponse.ts index 5e0adc8053..86e1c5e20d 100644 --- a/packages/nocodb/src/helpers/PagedResponse.ts +++ b/packages/nocodb/src/helpers/PagedResponse.ts @@ -37,7 +37,7 @@ export class PagedResponseImpl { if (offset && offset >= +count) { this.errors = [ { - message: 'Offset is beyond the total number of rows', + message: 'Offset is beyond the total number of records', }, ]; } diff --git a/packages/nocodb/src/helpers/catchError.ts b/packages/nocodb/src/helpers/catchError.ts index 8eb4e12786..6182cd93fc 100644 --- a/packages/nocodb/src/helpers/catchError.ts +++ b/packages/nocodb/src/helpers/catchError.ts @@ -215,7 +215,7 @@ export function extractDBError(error): { message = 'A timeout occurred while waiting for a table lock.'; break; case 'ER_NO_REFERENCED_ROW': - message = 'The referenced row does not exist.'; + message = 'The referenced record does not exist.'; break; case 'ER_ROW_IS_REFERENCED': message = 'This record is being referenced by other records.'; @@ -232,7 +232,7 @@ export function extractDBError(error): { message = 'A value is required for this field.'; break; case '23503': - message = 'The referenced row does not exist.'; + message = 'The referenced record does not exist.'; break; case '23514': message = 'A null value is not allowed for this field.'; diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 3187d50a94..48ee6f799b 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -15693,7 +15693,7 @@ ] } }, - "/api/v1/tables/{tableId}/rows/{rowId}": { + "/api/v1/tables/{tableId}/records/{rowId}": { "parameters": [ { "schema": { @@ -15790,7 +15790,7 @@ } } }, - "/api/v1/tables/{tableId}/rows/count": { + "/api/v1/tables/{tableId}/records/count": { "parameters": [ { "schema": { @@ -15929,7 +15929,7 @@ } } }, - "/api/v1/tables/{tableId}/links/{columnId}/rows/{rowId}": { + "/api/v1/tables/{tableId}/links/{columnId}/records/{rowId}": { "parameters": [ { "schema": { diff --git a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts index 593ccce344..530ee12988 100644 --- a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts @@ -139,7 +139,7 @@ const verifyColumnsInRsp = (row, columns: ColumnType[]) => { }; async function ncAxiosGet({ - url = `/api/v1/tables/${table.id}/rows`, + url = `/api/v1/tables/${table.id}/records`, query = {}, status = 200, }: { url?: string; query?: any; status?: number } = {}) { @@ -153,7 +153,7 @@ async function ncAxiosGet({ } async function ncAxiosPost({ - url = `/api/v1/tables/${table.id}/rows`, + url = `/api/v1/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -166,7 +166,7 @@ async function ncAxiosPost({ } async function ncAxiosPatch({ - url = `/api/v1/tables/${table.id}/rows`, + url = `/api/v1/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -179,7 +179,7 @@ async function ncAxiosPatch({ } async function ncAxiosDelete({ - url = `/api/v1/tables/${table.id}/rows`, + url = `/api/v1/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -200,7 +200,7 @@ async function ncAxiosLinkGet({ msg, }: { urlParams?: any; query?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/rows/${urlParams.rowId}`; + const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .get(url) .set('xc-auth', context.token) @@ -226,7 +226,7 @@ async function ncAxiosLinkAdd({ msg, }: { urlParams?: any; body?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/rows/${urlParams.rowId}`; + const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .post(url) .set('xc-auth', context.token) @@ -253,7 +253,7 @@ async function ncAxiosLinkRemove({ msg, }: { urlParams?: any; body?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/rows/${urlParams.rowId}`; + const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .delete(url) .set('xc-auth', context.token) @@ -310,7 +310,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows`, + url: `/api/v1/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -340,7 +340,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows`, + url: `/api/v1/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -366,7 +366,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows`, + url: `/api/v1/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -381,7 +381,7 @@ function generalDb() { it('Nested Read - Link to another record', async function () { const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows/1`, + url: `/api/v1/tables/${countryTable.id}/records/1`, }); // extract LTAR column "City List" @@ -398,7 +398,7 @@ function generalDb() { }); const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows/1`, + url: `/api/v1/tables/${countryTable.id}/records/1`, }); expect(records.body.Lookup).to.deep.equal(['Kabul']); }); @@ -414,7 +414,7 @@ function generalDb() { }); const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/rows/1`, + url: `/api/v1/tables/${countryTable.id}/records/1`, }); expect(records.body.Rollup).to.equal(1); @@ -792,7 +792,7 @@ function textBased() { it('List: invalid ID', async function () { // Invalid table ID await ncAxiosGet({ - url: `/api/v1/tables/123456789/rows`, + url: `/api/v1/tables/123456789/records`, status: unauthorizedResponse, }); @@ -919,7 +919,7 @@ function textBased() { it('Create: invalid ID', async function () { // Invalid table ID await ncAxiosPost({ - url: `/api/v1/tables/123456789/rows`, + url: `/api/v1/tables/123456789/records`, status: unauthorizedResponse, }); @@ -946,19 +946,19 @@ function textBased() { it('Read: all fields', async function () { const rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/100`, + url: `/api/v1/tables/${table.id}/records/100`, }); }); it('Read: invalid ID', async function () { // Invalid table ID await ncAxiosGet({ - url: `/api/v1/tables/123456789/rows/100`, + url: `/api/v1/tables/123456789/records/100`, status: unauthorizedResponse, }); // Invalid row ID await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/1000`, + url: `/api/v1/tables/${table.id}/records/1000`, status: 404, }); }); @@ -984,7 +984,7 @@ function textBased() { it('Update: partial', async function () { const recordBeforeUpdate = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/1`, + url: `/api/v1/tables/${table.id}/records/1`, }); const rsp = await ncAxiosPatch({ @@ -999,7 +999,7 @@ function textBased() { expect(rsp.body).to.deep.equal([{ Id: 1 }]); const recordAfterUpdate = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/1`, + url: `/api/v1/tables/${table.id}/records/1`, }); expect(recordAfterUpdate.body).to.deep.equal({ ...recordBeforeUpdate.body, @@ -1031,7 +1031,7 @@ function textBased() { it('Update: invalid ID', async function () { // Invalid table ID await ncAxiosPatch({ - url: `/api/v1/tables/123456789/rows`, + url: `/api/v1/tables/123456789/records`, body: { Id: 100, SingleLineText: 'some text' }, status: unauthorizedResponse, }); @@ -1055,7 +1055,7 @@ function textBased() { // check that it's gone await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/1`, + url: `/api/v1/tables/${table.id}/records/1`, status: 404, }); }); @@ -1066,11 +1066,11 @@ function textBased() { // check that it's gone await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/1`, + url: `/api/v1/tables/${table.id}/records/1`, status: 404, }); await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/2`, + url: `/api/v1/tables/${table.id}/records/2`, status: 404, }); }); @@ -1080,7 +1080,7 @@ function textBased() { it('Delete: invalid ID', async function () { // Invalid table ID await ncAxiosDelete({ - url: `/api/v1/tables/123456789/rows`, + url: `/api/v1/tables/123456789/records`, body: { Id: 100 }, status: unauthorizedResponse, }); @@ -1261,7 +1261,7 @@ function numberBased() { // read record with Id 401 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/401`, + url: `/api/v1/tables/${table.id}/records/401`, }); expect(rsp.body).to.deep.equal({ ...records[0], Id: 401 }); @@ -1452,7 +1452,7 @@ function selectBased() { // read record with Id 401 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/401`, + url: `/api/v1/tables/${table.id}/records/401`, }); expect(rsp.body).to.deep.equal({ Id: 401, ...records[0] }); @@ -1591,7 +1591,7 @@ function dateBased() { // read record with Id 801 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/rows/801`, + url: `/api/v1/tables/${table.id}/records/801`, }); expect(rsp.body).to.deep.equal({ Id: 801, ...records[0] }); @@ -2430,9 +2430,9 @@ function linkBased() { status: 200, }); - // Link List: Invalid query parameter - offset > total rows + // Link List: Invalid query parameter - offset > total records if (debugMode) - console.log('Link List: Invalid query parameter - offset > total rows'); + console.log('Link List: Invalid query parameter - offset > total records'); await ncAxiosLinkGet({ ...validParams, query: { ...validParams.query, offset: 9999 }, @@ -2457,9 +2457,9 @@ function linkBased() { status: 200, }); - // Link List: Invalid query parameter - limit > total rows + // Link List: Invalid query parameter - limit > total records if (debugMode) - console.log('Link List: Invalid query parameter - limit > total rows'); + console.log('Link List: Invalid query parameter - limit > total records'); await ncAxiosLinkGet({ ...validParams, query: { ...validParams.query, limit: 9999 }, diff --git a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts index e19649e55f..f6c9476be3 100644 --- a/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/viewRow.test.ts @@ -672,7 +672,7 @@ function viewRowTests() { .expect(200); const row = response.body; - if (row['Title'] !== 'Test') throw new Error('Wrong row title'); + if (row['Title'] !== 'Test') throw new Error('Wrong record title'); }; it('Create table row grid', async function () { From 672814504fc4b9eaa5e3c764a81c43b286bd71eb Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 13:53:35 +0000 Subject: [PATCH 2/7] fix(nc-gui): Renamed columns to field --- .../smartsheet/column/EditOrAdd.vue | 2 +- .../smartsheet/column/LookupOptions.vue | 2 +- packages/nc-gui/lang/en.json | 89 ++++++++++--------- 3 files changed, 47 insertions(+), 46 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue index a6056c8c20..2198d253bd 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -48,7 +48,7 @@ const { getMeta } = useMetas() const { t } = useI18n() -const columnLabel = computed(() => props.columnLabel || t('objects.column')) +const columnLabel = computed(() => props.columnLabel || t('objects.field')) const { $e } = useNuxtApp() diff --git a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue index 5894d00d02..7efcfee430 100644 --- a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue @@ -105,7 +105,7 @@ const cellIcon = (column: ColumnType) => - + Date: Mon, 9 Oct 2023 13:53:35 +0000 Subject: [PATCH 3/7] fix(nc-gui): Row -> Record --- packages/nocodb/src/services/data-table.service.ts | 4 ++-- .../nocodb/tests/unit/rest/tests/newDataApis.test.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/nocodb/src/services/data-table.service.ts b/packages/nocodb/src/services/data-table.service.ts index 1010d6ffdf..118b5072f2 100644 --- a/packages/nocodb/src/services/data-table.service.ts +++ b/packages/nocodb/src/services/data-table.service.ts @@ -247,7 +247,7 @@ export class DataTableService { .join('___'); // if duplicate then throw error if (keys.has(pk)) { - NcError.unprocessableEntity('Duplicate row with id ' + pk); + NcError.unprocessableEntity('Duplicate record with id ' + pk); } if (pk === undefined || pk === null) { @@ -274,7 +274,7 @@ export class DataTableService { }); 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); diff --git a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts index 530ee12988..72c28a336b 100644 --- a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts @@ -2262,7 +2262,7 @@ function linkBased() { ...validParams, urlParams: { ...validParams.urlParams, rowId: 9999 }, status: 404, - msg: "Row with id '9999' not found", + msg: "Record with id '9999' not found", }); // Body parameter error @@ -2334,7 +2334,7 @@ function linkBased() { ...validParams, urlParams: { ...validParams.urlParams, rowId: 9999 }, status: 404, - msg: "Row with id '9999' not found", + msg: "Record with id '9999' not found", }); // Body parameter error @@ -2406,7 +2406,7 @@ function linkBased() { ...validParams, urlParams: { ...validParams.urlParams, rowId: 9999 }, status: 404, - msg: "Row with id '9999' not found", + msg: "Record with id '9999' not found", }); // Query parameter error @@ -2432,7 +2432,9 @@ function linkBased() { // Link List: Invalid query parameter - offset > total records if (debugMode) - console.log('Link List: Invalid query parameter - offset > total records'); + console.log( + 'Link List: Invalid query parameter - offset > total records', + ); await ncAxiosLinkGet({ ...validParams, query: { ...validParams.query, offset: 9999 }, From ce24a7d200d7fcddcb703ad4de29772e341ba6e1 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 13:53:36 +0000 Subject: [PATCH 4/7] fix(nc-gui): Playwright issues --- tests/playwright/pages/Dashboard/Grid/Column/index.ts | 2 +- tests/playwright/pages/Dashboard/Grid/Group.ts | 2 +- tests/playwright/pages/Dashboard/Grid/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/index.ts b/tests/playwright/pages/Dashboard/Grid/Column/index.ts index 8186f95b82..876e7b348d 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/index.ts @@ -260,7 +260,7 @@ export class ColumnPageObject extends BasePage { await this.rootPage.locator('li[role="menuitem"]:has-text("Delete"):visible').click(); // pressing on delete column button - await this.rootPage.locator('.ant-modal.active button:has-text("Delete Column")').click(); + await this.rootPage.locator('.ant-modal.active button:has-text("Delete Field")').click(); // wait till modal is closed await this.rootPage.locator('.ant-modal.active').waitFor({ state: 'hidden' }); diff --git a/tests/playwright/pages/Dashboard/Grid/Group.ts b/tests/playwright/pages/Dashboard/Grid/Group.ts index 9d531eaed0..8fe3e0c6ba 100644 --- a/tests/playwright/pages/Dashboard/Grid/Group.ts +++ b/tests/playwright/pages/Dashboard/Grid/Group.ts @@ -122,7 +122,7 @@ export class GroupPageObject extends BasePage { }); // Click text=Delete Row - await this.rootPage.locator('.ant-dropdown-menu-item:has-text("Delete row")').click(); + await this.rootPage.locator('.ant-dropdown-menu-item:has-text("Delete record")').click(); // todo: improve selector await this.rootPage .locator('span.ant-dropdown-menu-title-content > nc-base-menu-item') diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index 8037996f3b..a13a582498 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -199,7 +199,7 @@ export class GridPage extends BasePage { }); // Click text=Delete Row - await this.rootPage.locator('.ant-dropdown-menu-item:has-text("Delete row")').click(); + await this.rootPage.locator('.ant-dropdown-menu-item:has-text("Delete record")').click(); // todo: improve selector await this.rootPage From e2d47f0bca5a1276728cd7ea608fdb95d0528b52 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 13:53:36 +0000 Subject: [PATCH 5/7] fix(nc-gui): row -> record --- packages/nc-gui/lang/en.json | 2 +- tests/playwright/pages/Dashboard/Grid/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index b1206734af..8a5ba8e0ce 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -706,7 +706,7 @@ "deleteRows": "Delete records", "predictColumns": "Predict Fields", "predictFormulas": "Predict Formulas", - "deleteSelectedRow": "Delete selected records", + "deleteSelectedRow": "Delete Selected Records", "importExcel": "Import Excel", "importCSV": "Import CSV", "downloadCSV": "Download as CSV", diff --git a/tests/playwright/pages/Dashboard/Grid/index.ts b/tests/playwright/pages/Dashboard/Grid/index.ts index a13a582498..86341c4e2e 100644 --- a/tests/playwright/pages/Dashboard/Grid/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/index.ts @@ -272,7 +272,7 @@ export class GridPage extends BasePage { await this.get().locator('[data-testid="nc-check-all"]').nth(0).click({ button: 'right', }); - await this.rootPage.locator('.nc-menu-item:has-text("Update Selected Rows")').click(); + await this.rootPage.locator('.nc-menu-item:has-text("Update Selected Records")').click(); await this.dashboard.waitForLoaderToDisappear(); } From 7d71467f15776a5d8757be6e3b095b9c77def597 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 13:53:36 +0000 Subject: [PATCH 6/7] fix(nc-gui): Renamed data table api to v2 --- .../src/controllers/data-table.controller.ts | 18 +++++++++--------- packages/nocodb/src/schema/swagger.json | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/nocodb/src/controllers/data-table.controller.ts b/packages/nocodb/src/controllers/data-table.controller.ts index 8159cdf833..8f16ff789f 100644 --- a/packages/nocodb/src/controllers/data-table.controller.ts +++ b/packages/nocodb/src/controllers/data-table.controller.ts @@ -24,7 +24,7 @@ export class DataTableController { constructor(private readonly dataTableService: DataTableService) {} // todo: Handle the error case where view doesnt belong to model - @Get('/api/v1/tables/:modelId/records') + @Get('/api/v2/tables/:modelId/records') @Acl('dataList') async dataList( @Request() req, @@ -43,7 +43,7 @@ export class DataTableController { res.json(responseData); } - @Get(['/api/v1/tables/:modelId/records/count']) + @Get(['/api/v2/tables/:modelId/records/count']) @Acl('dataCount') async dataCount( @Request() req, @@ -60,7 +60,7 @@ export class DataTableController { res.json(countResult); } - @Post(['/api/v1/tables/:modelId/records']) + @Post(['/api/v2/tables/:modelId/records']) @HttpCode(200) @Acl('dataInsert') async dataInsert( @@ -77,7 +77,7 @@ export class DataTableController { }); } - @Patch(['/api/v1/tables/:modelId/records']) + @Patch(['/api/v2/tables/:modelId/records']) @Acl('dataUpdate') async dataUpdate( @Request() req, @@ -93,7 +93,7 @@ export class DataTableController { }); } - @Delete(['/api/v1/tables/:modelId/records']) + @Delete(['/api/v2/tables/:modelId/records']) @Acl('dataDelete') async dataDelete( @Request() req, @@ -109,7 +109,7 @@ export class DataTableController { }); } - @Get(['/api/v1/tables/:modelId/records/:rowId']) + @Get(['/api/v2/tables/:modelId/records/:rowId']) @Acl('dataRead') async dataRead( @Request() req, @@ -125,7 +125,7 @@ export class DataTableController { }); } - @Get(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) + @Get(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataList') async nestedDataList( @Request() req, @@ -143,7 +143,7 @@ export class DataTableController { }); } - @Post(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) + @Post(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataLink') async nestedLink( @Request() req, @@ -164,7 +164,7 @@ export class DataTableController { }); } - @Delete(['/api/v1/tables/:modelId/links/:columnId/records/:rowId']) + @Delete(['/api/v2/tables/:modelId/links/:columnId/records/:rowId']) @Acl('nestedDataUnlink') async nestedUnlink( @Request() req, diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 48ee6f799b..bdc8c5c1a8 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -15338,7 +15338,7 @@ ] } }, - "/api/v1/tables/{tableId}/rows": { + "/api/v2/tables/{tableId}/rows": { "parameters": [ { "schema": { @@ -15693,7 +15693,7 @@ ] } }, - "/api/v1/tables/{tableId}/records/{rowId}": { + "/api/v2/tables/{tableId}/records/{rowId}": { "parameters": [ { "schema": { @@ -15790,7 +15790,7 @@ } } }, - "/api/v1/tables/{tableId}/records/count": { + "/api/v2/tables/{tableId}/records/count": { "parameters": [ { "schema": { @@ -15929,7 +15929,7 @@ } } }, - "/api/v1/tables/{tableId}/links/{columnId}/records/{rowId}": { + "/api/v2/tables/{tableId}/links/{columnId}/records/{rowId}": { "parameters": [ { "schema": { From 984f1d167bd6793479b39b74672d23779b9c7480 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 9 Oct 2023 13:53:36 +0000 Subject: [PATCH 7/7] fix(nc-gui): Renamed data table api to v2 --- .../tests/unit/rest/tests/newDataApis.test.ts | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts index 72c28a336b..1ab1fccd9b 100644 --- a/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts +++ b/packages/nocodb/tests/unit/rest/tests/newDataApis.test.ts @@ -139,7 +139,7 @@ const verifyColumnsInRsp = (row, columns: ColumnType[]) => { }; async function ncAxiosGet({ - url = `/api/v1/tables/${table.id}/records`, + url = `/api/v2/tables/${table.id}/records`, query = {}, status = 200, }: { url?: string; query?: any; status?: number } = {}) { @@ -153,7 +153,7 @@ async function ncAxiosGet({ } async function ncAxiosPost({ - url = `/api/v1/tables/${table.id}/records`, + url = `/api/v2/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -166,7 +166,7 @@ async function ncAxiosPost({ } async function ncAxiosPatch({ - url = `/api/v1/tables/${table.id}/records`, + url = `/api/v2/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -179,7 +179,7 @@ async function ncAxiosPatch({ } async function ncAxiosDelete({ - url = `/api/v1/tables/${table.id}/records`, + url = `/api/v2/tables/${table.id}/records`, body = {}, status = 200, }: { url?: string; body?: any; status?: number } = {}) { @@ -200,7 +200,7 @@ async function ncAxiosLinkGet({ msg, }: { urlParams?: any; query?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; + const url = `/api/v2/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .get(url) .set('xc-auth', context.token) @@ -226,7 +226,7 @@ async function ncAxiosLinkAdd({ msg, }: { urlParams?: any; body?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; + const url = `/api/v2/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .post(url) .set('xc-auth', context.token) @@ -253,7 +253,7 @@ async function ncAxiosLinkRemove({ msg, }: { urlParams?: any; body?: any; status?: number; msg?: string } = {}) { const urlParams = { tableId, linkId, rowId }; - const url = `/api/v1/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; + const url = `/api/v2/tables/${urlParams.tableId}/links/${urlParams.linkId}/records/${urlParams.rowId}`; const response = await request(context.app) .delete(url) .set('xc-auth', context.token) @@ -310,7 +310,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records`, + url: `/api/v2/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -340,7 +340,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records`, + url: `/api/v2/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -366,7 +366,7 @@ function generalDb() { // read first 4 records const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records`, + url: `/api/v2/tables/${countryTable.id}/records`, query: { limit: 4, }, @@ -381,7 +381,7 @@ function generalDb() { it('Nested Read - Link to another record', async function () { const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records/1`, + url: `/api/v2/tables/${countryTable.id}/records/1`, }); // extract LTAR column "City List" @@ -398,7 +398,7 @@ function generalDb() { }); const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records/1`, + url: `/api/v2/tables/${countryTable.id}/records/1`, }); expect(records.body.Lookup).to.deep.equal(['Kabul']); }); @@ -414,7 +414,7 @@ function generalDb() { }); const records = await ncAxiosGet({ - url: `/api/v1/tables/${countryTable.id}/records/1`, + url: `/api/v2/tables/${countryTable.id}/records/1`, }); expect(records.body.Rollup).to.equal(1); @@ -792,7 +792,7 @@ function textBased() { it('List: invalid ID', async function () { // Invalid table ID await ncAxiosGet({ - url: `/api/v1/tables/123456789/records`, + url: `/api/v2/tables/123456789/records`, status: unauthorizedResponse, }); @@ -919,7 +919,7 @@ function textBased() { it('Create: invalid ID', async function () { // Invalid table ID await ncAxiosPost({ - url: `/api/v1/tables/123456789/records`, + url: `/api/v2/tables/123456789/records`, status: unauthorizedResponse, }); @@ -946,19 +946,19 @@ function textBased() { it('Read: all fields', async function () { const rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/100`, + url: `/api/v2/tables/${table.id}/records/100`, }); }); it('Read: invalid ID', async function () { // Invalid table ID await ncAxiosGet({ - url: `/api/v1/tables/123456789/records/100`, + url: `/api/v2/tables/123456789/records/100`, status: unauthorizedResponse, }); // Invalid row ID await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/1000`, + url: `/api/v2/tables/${table.id}/records/1000`, status: 404, }); }); @@ -984,7 +984,7 @@ function textBased() { it('Update: partial', async function () { const recordBeforeUpdate = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/1`, + url: `/api/v2/tables/${table.id}/records/1`, }); const rsp = await ncAxiosPatch({ @@ -999,7 +999,7 @@ function textBased() { expect(rsp.body).to.deep.equal([{ Id: 1 }]); const recordAfterUpdate = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/1`, + url: `/api/v2/tables/${table.id}/records/1`, }); expect(recordAfterUpdate.body).to.deep.equal({ ...recordBeforeUpdate.body, @@ -1031,7 +1031,7 @@ function textBased() { it('Update: invalid ID', async function () { // Invalid table ID await ncAxiosPatch({ - url: `/api/v1/tables/123456789/records`, + url: `/api/v2/tables/123456789/records`, body: { Id: 100, SingleLineText: 'some text' }, status: unauthorizedResponse, }); @@ -1055,7 +1055,7 @@ function textBased() { // check that it's gone await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/1`, + url: `/api/v2/tables/${table.id}/records/1`, status: 404, }); }); @@ -1066,11 +1066,11 @@ function textBased() { // check that it's gone await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/1`, + url: `/api/v2/tables/${table.id}/records/1`, status: 404, }); await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/2`, + url: `/api/v2/tables/${table.id}/records/2`, status: 404, }); }); @@ -1080,7 +1080,7 @@ function textBased() { it('Delete: invalid ID', async function () { // Invalid table ID await ncAxiosDelete({ - url: `/api/v1/tables/123456789/records`, + url: `/api/v2/tables/123456789/records`, body: { Id: 100 }, status: unauthorizedResponse, }); @@ -1261,7 +1261,7 @@ function numberBased() { // read record with Id 401 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/401`, + url: `/api/v2/tables/${table.id}/records/401`, }); expect(rsp.body).to.deep.equal({ ...records[0], Id: 401 }); @@ -1452,7 +1452,7 @@ function selectBased() { // read record with Id 401 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/401`, + url: `/api/v2/tables/${table.id}/records/401`, }); expect(rsp.body).to.deep.equal({ Id: 401, ...records[0] }); @@ -1591,7 +1591,7 @@ function dateBased() { // read record with Id 801 rsp = await ncAxiosGet({ - url: `/api/v1/tables/${table.id}/records/801`, + url: `/api/v2/tables/${table.id}/records/801`, }); expect(rsp.body).to.deep.equal({ Id: 801, ...records[0] });