Browse Source

fix(nc-gui): Renamed data table api to v2

pull/6624/head
Muhammed Mustafa 1 year ago
parent
commit
7d71467f15
  1. 18
      packages/nocodb/src/controllers/data-table.controller.ts
  2. 8
      packages/nocodb/src/schema/swagger.json

18
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,

8
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": {

Loading…
Cancel
Save