From ffde216556ea4940f874877dd07007da5a37ad6a Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 29 May 2023 12:21:22 +0530 Subject: [PATCH] refactor: update path Signed-off-by: Pranav C --- .../noco-docs/content/en/developer-resources/rest-apis.md | 6 +++--- packages/nocodb/src/controllers/data-table.controller.ts | 6 +++--- packages/nocodb/src/schema/swagger.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/noco-docs/content/en/developer-resources/rest-apis.md b/packages/noco-docs/content/en/developer-resources/rest-apis.md index f18a57d348..d93daa069e 100644 --- a/packages/noco-docs/content/en/developer-resources/rest-apis.md +++ b/packages/noco-docs/content/en/developer-resources/rest-apis.md @@ -76,9 +76,9 @@ Currently, the default value for {orgs} is noco. Users will be able to ch | Data | Get | dbViewRow | groupedDataList | /api/v1/db/data/{orgs}/{projectName}/{tableName}/views/{viewName}/group/{columnId} | | Data | Get | dbTableRow | tableRowList | /api/v1/base/{baseId}/tables/{tableId} | | Data | Post | dbTableRow | tableRowCreate | /api/v1/base/{baseId}/tables/{tableId} | -| Data | Get | dbTableRow | tableRowRead | /api/v1/db/tables/{tableId}/rows/{rowId} | -| Data | Patch | dbTableRow | tableRowUpdate | /api/v1/db/tables/{tableId}/rows/{rowId} | -| Data | Delete| dbTableRow | tableRowDelete | /api/v1/db/tables/{tableId}/rows/{rowId} | +| Data | Get | dbTableRow | tableRowRead | /api/v1/base/tables/{tableId}/rows/{rowId} | +| Data | Patch | dbTableRow | tableRowUpdate | /api/v1/base/tables/{tableId}/rows/{rowId} | +| Data | Delete| dbTableRow | tableRowDelete | /api/v1/base/tables/{tableId}/rows/{rowId} | | Data | Get | dbTableRow | tableRowCount | /api/v1/base/{baseId}/tables/{tableId}/count | ### Meta APIs diff --git a/packages/nocodb/src/controllers/data-table.controller.ts b/packages/nocodb/src/controllers/data-table.controller.ts index c16ac877a8..3073423c30 100644 --- a/packages/nocodb/src/controllers/data-table.controller.ts +++ b/packages/nocodb/src/controllers/data-table.controller.ts @@ -85,7 +85,7 @@ export class DataTableController { }); } - @Patch(['/api/v1/db/tables/:modelId/rows/:rowId']) + @Patch(['/api/v1/base/tables/:modelId/rows/:rowId']) @Acl('dataUpdate') async dataUpdate( @Request() req, @@ -102,7 +102,7 @@ export class DataTableController { }); } - @Delete(['/api/v1/db/tables/:modelId/rows/:rowId']) + @Delete(['/api/v1/base/tables/:modelId/rows/:rowId']) @Acl('dataDelete') async dataDelete( @Request() req, @@ -118,7 +118,7 @@ export class DataTableController { }); } - @Get(['/api/v1/db/tables/:modelId/rows/:rowId']) + @Get(['/api/v1/base/tables/:modelId/rows/:rowId']) @Acl('dataRead') async dataRead( @Request() req, diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 5fd19b9012..912a9fa6d9 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -14263,7 +14263,7 @@ } } }, - "/api/v1/db/tables/{tableId}/rows/{rowId}": { + "/api/v1/base/tables/{tableId}/rows/{rowId}": { "parameters": [ { "schema": {