Browse Source

refactor: change new data api to v2

pull/6644/head
Pranav C 1 year ago
parent
commit
5c87dfbd83
  1. 6
      packages/nocodb/src/controllers/api-docs/api-docs.controller.ts
  2. 6
      packages/nocodb/src/controllers/api-tokens.controller.ts
  3. 12
      packages/nocodb/src/controllers/audits.controller.ts
  4. 12
      packages/nocodb/src/controllers/base-users.controller.ts
  5. 14
      packages/nocodb/src/controllers/bases.controller.ts
  6. 4
      packages/nocodb/src/controllers/caches.controller.ts
  7. 14
      packages/nocodb/src/controllers/columns.controller.ts
  8. 16
      packages/nocodb/src/controllers/filters.controller.ts
  9. 2
      packages/nocodb/src/controllers/form-columns.controller.ts
  10. 6
      packages/nocodb/src/controllers/forms.controller.ts
  11. 6
      packages/nocodb/src/controllers/galleries.controller.ts
  12. 4
      packages/nocodb/src/controllers/grid-columns.controller.ts
  13. 4
      packages/nocodb/src/controllers/grids.controller.ts
  14. 14
      packages/nocodb/src/controllers/hooks.controller.ts
  15. 6
      packages/nocodb/src/controllers/kanbans.controller.ts
  16. 6
      packages/nocodb/src/controllers/maps.controller.ts
  17. 4
      packages/nocodb/src/controllers/meta-diffs.controller.ts
  18. 4
      packages/nocodb/src/controllers/model-visibilities.controller.ts
  19. 12
      packages/nocodb/src/controllers/plugins.controller.ts
  20. 8
      packages/nocodb/src/controllers/shared-bases.controller.ts
  21. 10
      packages/nocodb/src/controllers/sorts.controller.ts
  22. 6
      packages/nocodb/src/controllers/sources.controller.ts
  23. 2
      packages/nocodb/src/controllers/sql-views.controller.ts
  24. 12
      packages/nocodb/src/controllers/sync.controller.ts
  25. 16
      packages/nocodb/src/controllers/tables.controller.ts
  26. 6
      packages/nocodb/src/controllers/utils.controller.ts
  27. 6
      packages/nocodb/src/controllers/view-columns.controller.ts
  28. 18
      packages/nocodb/src/controllers/views.controller.ts
  29. 10
      packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts
  30. 4
      packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts
  31. 4
      packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts
  32. 4
      packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts
  33. 2
      packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts
  34. 2
      packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts
  35. 2
      packages/nocodb/tests/unit/rest/tests/base.test.ts

6
packages/nocodb/src/controllers/api-docs/api-docs.controller.ts

@ -20,7 +20,7 @@ export class ApiDocsController {
@Get([
'/api/v1/db/meta/projects/:baseId/swagger.json',
'/api/v1/meta/bases/:baseId/swagger.json',
'/api/v2/meta/bases/:baseId/swagger.json',
])
@UseGuards(MetaApiLimiterGuard, GlobalGuard)
@Acl('swaggerJson')
@ -34,7 +34,7 @@ export class ApiDocsController {
}
@Get([
'/api/v1/meta/bases/:baseId/swagger',
'/api/v2/meta/bases/:baseId/swagger',
'/api/v1/db/meta/projects/:baseId/swagger',
])
@UseGuards(PublicApiLimiterGuard)
@ -45,7 +45,7 @@ export class ApiDocsController {
@UseGuards(PublicApiLimiterGuard)
@Get([
'/api/v1/db/meta/projects/:baseId/redoc',
'/api/v1/meta/bases/:baseId/redoc',
'/api/v2/meta/bases/:baseId/redoc',
])
redocHtml(@Param('baseId') baseId: string, @Response() res) {
res.send(getRedocHtml({ ncSiteUrl: process.env.NC_PUBLIC_URL || '' }));

6
packages/nocodb/src/controllers/api-tokens.controller.ts

@ -22,7 +22,7 @@ export class ApiTokensController {
@Get([
'/api/v1/db/meta/projects/:baseId/api-tokens',
'/api/v1/meta/bases/:baseId/api-tokens',
'/api/v2/meta/bases/:baseId/api-tokens',
])
@Acl('baseApiTokenList')
async apiTokenList(@Request() req) {
@ -33,7 +33,7 @@ export class ApiTokensController {
@Post([
'/api/v1/db/meta/projects/:baseId/api-tokens',
'/api/v1/meta/bases/:baseId/api-tokens',
'/api/v2/meta/bases/:baseId/api-tokens',
])
@HttpCode(200)
@Acl('baseApiTokenCreate')
@ -46,7 +46,7 @@ export class ApiTokensController {
@Delete([
'/api/v1/db/meta/projects/:baseId/api-tokens/:token',
'/api/v1/meta/bases/:baseId/api-tokens/:token',
'/api/v2/meta/bases/:baseId/api-tokens/:token',
])
@Acl('baseApiTokenDelete')
async apiTokenDelete(@Request() req, @Param('token') token: string) {

12
packages/nocodb/src/controllers/audits.controller.ts

@ -21,7 +21,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard';
export class AuditsController {
constructor(private readonly auditsService: AuditsService) {}
@Post(['/api/v1/db/meta/audits/comments', '/api/v1/meta/audits/comments'])
@Post(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments'])
@HttpCode(200)
@Acl('commentRow')
async commentRow(@Request() req) {
@ -33,7 +33,7 @@ export class AuditsController {
@Post([
'/api/v1/db/meta/audits/rows/:rowId/update',
'/api/v1/meta/audits/rows/:rowId/update',
'/api/v2/meta/audits/rows/:rowId/update',
])
@HttpCode(200)
@Acl('auditRowUpdate')
@ -44,7 +44,7 @@ export class AuditsController {
});
}
@Get(['/api/v1/db/meta/audits/comments', '/api/v1/meta/audits/comments'])
@Get(['/api/v1/db/meta/audits/comments', '/api/v2/meta/audits/comments'])
@Acl('commentList')
async commentList(@Request() req) {
return new PagedResponseImpl(
@ -54,7 +54,7 @@ export class AuditsController {
@Patch([
'/api/v1/db/meta/audits/:auditId/comment',
'/api/v1/meta/audits/:auditId/comment',
'/api/v2/meta/audits/:auditId/comment',
])
@Acl('commentUpdate')
async commentUpdate(
@ -71,7 +71,7 @@ export class AuditsController {
@Get([
'/api/v1/db/meta/projects/:baseId/audits/',
'/api/v1/meta/bases/:baseId/audits/',
'/api/v2/meta/bases/:baseId/audits/',
])
@Acl('auditList')
async auditList(@Request() req, @Param('baseId') baseId: string) {
@ -89,7 +89,7 @@ export class AuditsController {
@Get([
'/api/v1/db/meta/audits/comments/count',
'/api/v1/meta/audits/comments/count',
'/api/v2/meta/audits/comments/count',
])
@Acl('commentsCount')
async commentsCount(

12
packages/nocodb/src/controllers/base-users.controller.ts

@ -24,7 +24,7 @@ export class BaseUsersController {
@Get([
'/api/v1/db/meta/projects/:baseId/users',
'/api/v1/meta/bases/:baseId/users',
'/api/v2/meta/bases/:baseId/users',
])
@Acl('userList')
async userList(@Param('baseId') baseId: string, @Request() req) {
@ -38,7 +38,7 @@ export class BaseUsersController {
@Post([
'/api/v1/db/meta/projects/:baseId/users',
'/api/v1/meta/bases/:baseId/users',
'/api/v2/meta/bases/:baseId/users',
])
@HttpCode(200)
@Acl('userInvite')
@ -60,7 +60,7 @@ export class BaseUsersController {
@Patch([
'/api/v1/db/meta/projects/:baseId/users/:userId',
'/api/v1/meta/bases/:baseId/users/:userId',
'/api/v2/meta/bases/:baseId/users/:userId',
])
@Acl('baseUserUpdate')
async baseUserUpdate(
@ -85,7 +85,7 @@ export class BaseUsersController {
@Delete([
'/api/v1/db/meta/projects/:baseId/users/:userId',
'/api/v1/meta/bases/:baseId/users/:userId',
'/api/v2/meta/bases/:baseId/users/:userId',
])
@Acl('baseUserDelete')
async baseUserDelete(
@ -105,7 +105,7 @@ export class BaseUsersController {
@Post([
'/api/v1/db/meta/projects/:baseId/users/:userId/resend-invite',
'/api/v1/meta/bases/:baseId/users/:userId/resend-invite',
'/api/v2/meta/bases/:baseId/users/:userId/resend-invite',
])
@HttpCode(200)
@Acl('baseUserInviteResend')
@ -128,7 +128,7 @@ export class BaseUsersController {
@Patch([
'/api/v1/db/meta/projects/:baseId/user',
'/api/v1/meta/bases/:baseId/user',
'/api/v2/meta/bases/:baseId/user',
])
@Acl('baseUserMetaUpdate')
async baseUserMetaUpdate(

14
packages/nocodb/src/controllers/bases.controller.ts

@ -31,7 +31,7 @@ export class BasesController {
@Acl('baseList', {
scope: 'org',
})
@Get(['/api/v1/db/meta/projects/', '/api/v1/meta/bases/'])
@Get(['/api/v1/db/meta/projects/', '/api/v2/meta/bases/'])
async list(@Query() queryParams: Record<string, any>, @Request() req) {
const bases = await this.projectsService.baseList({
user: req.user,
@ -46,7 +46,7 @@ export class BasesController {
@Acl('baseInfoGet')
@Get([
'/api/v1/db/meta/projects/:baseId/info',
'/api/v1/meta/bases/:baseId/info',
'/api/v2/meta/bases/:baseId/info',
])
async baseInfoGet() {
return {
@ -60,7 +60,7 @@ export class BasesController {
}
@Acl('baseGet')
@Get(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId'])
@Get(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId'])
async baseGet(@Param('baseId') baseId: string) {
const base = await this.projectsService.getProjectWithInfo({
baseId: baseId,
@ -72,7 +72,7 @@ export class BasesController {
}
@Acl('baseUpdate')
@Patch(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId'])
@Patch(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId'])
async baseUpdate(
@Param('baseId') baseId: string,
@Body() body: Record<string, any>,
@ -88,7 +88,7 @@ export class BasesController {
}
@Acl('baseDelete')
@Delete(['/api/v1/db/meta/projects/:baseId', '/api/v1/meta/bases/:baseId'])
@Delete(['/api/v1/db/meta/projects/:baseId', '/api/v2/meta/bases/:baseId'])
async baseDelete(@Param('baseId') baseId: string, @Request() req) {
const deleted = await this.projectsService.baseSoftDelete({
baseId,
@ -101,7 +101,7 @@ export class BasesController {
@Acl('baseCreate', {
scope: 'org',
})
@Post(['/api/v1/db/meta/projects', '/api/v1/meta/bases'])
@Post(['/api/v1/db/meta/projects', '/api/v2/meta/bases'])
@HttpCode(200)
async baseCreate(@Body() baseBody: ProjectReqType, @Request() req) {
const base = await this.projectsService.baseCreate({
@ -115,7 +115,7 @@ export class BasesController {
@Acl('hasEmptyOrNullFilters')
@Get([
'/api/v1/db/meta/projects/:baseId/has-empty-or-null-filters',
'/api/v1/meta/bases/:baseId/has-empty-or-null-filters',
'/api/v2/meta/bases/:baseId/has-empty-or-null-filters',
])
async hasEmptyOrNullFilters(@Param('baseId') baseId: string) {
return await Filter.hasEmptyOrNullFilters(baseId);

4
packages/nocodb/src/controllers/caches.controller.ts

@ -10,7 +10,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard';
export class CachesController {
constructor(private readonly cachesService: CachesService) {}
@Get(['/api/v1/db/meta/cache', '/api/v1/meta/cache'])
@Get(['/api/v1/db/meta/cache', '/api/v2/meta/cache'])
@Acl('cacheGet', {
scope: 'org',
allowedRoles: [OrgUserRoles.SUPER_ADMIN],
@ -25,7 +25,7 @@ export class CachesController {
return JSON.stringify(data);
}
@Delete(['/api/v1/db/meta/cache', '/api/v1/meta/cache'])
@Delete(['/api/v1/db/meta/cache', '/api/v2/meta/cache'])
@Acl('cacheDelete', {
scope: 'org',
allowedRoles: [OrgUserRoles.SUPER_ADMIN],

14
packages/nocodb/src/controllers/columns.controller.ts

@ -24,7 +24,7 @@ export class ColumnsController {
@Post([
'/api/v1/db/meta/tables/:tableId/columns/',
'/api/v1/meta/tables/:tableId/columns/',
'/api/v2/meta/tables/:tableId/columns/',
])
@HttpCode(200)
@Acl('columnAdd')
@ -43,7 +43,7 @@ export class ColumnsController {
@Patch([
'/api/v1/db/meta/columns/:columnId',
'/api/v1/meta/columns/:columnId',
'/api/v2/meta/columns/:columnId',
])
@Acl('columnUpdate')
async columnUpdate(
@ -61,7 +61,7 @@ export class ColumnsController {
@Delete([
'/api/v1/db/meta/columns/:columnId',
'/api/v1/meta/columns/:columnId',
'/api/v2/meta/columns/:columnId',
])
@Acl('columnDelete')
async columnDelete(@Param('columnId') columnId: string, @Request() req: any) {
@ -72,7 +72,7 @@ export class ColumnsController {
});
}
@Get(['/api/v1/db/meta/columns/:columnId', '/api/v1/meta/columns/:columnId'])
@Get(['/api/v1/db/meta/columns/:columnId', '/api/v2/meta/columns/:columnId'])
@Acl('columnGet')
async columnGet(@Param('columnId') columnId: string) {
return await this.columnsService.columnGet({ columnId });
@ -80,7 +80,7 @@ export class ColumnsController {
@Post([
'/api/v1/db/meta/columns/:columnId/primary',
'/api/v1/meta/columns/:columnId/primary',
'/api/v2/meta/columns/:columnId/primary',
])
@HttpCode(200)
@Acl('columnSetAsPrimary')
@ -90,7 +90,7 @@ export class ColumnsController {
@Get([
'/api/v1/db/meta/tables/:tableId/columns/hash',
'/api/v1/meta/tables/:tableId/columns/hash',
'/api/v2/meta/tables/:tableId/columns/hash',
])
@Acl('columnsHash')
async columnsHash(@Param('tableId') tableId: string) {
@ -99,7 +99,7 @@ export class ColumnsController {
@Post([
'/api/v1/db/meta/tables/:tableId/columns/bulk',
'/api/v1/meta/tables/:tableId/columns/bulk',
'/api/v2/meta/tables/:tableId/columns/bulk',
])
@HttpCode(200)
@Acl('columnBulk')

16
packages/nocodb/src/controllers/filters.controller.ts

@ -24,7 +24,7 @@ export class FiltersController {
@Get([
'/api/v1/db/meta/views/:viewId/filters',
'/api/v1/meta/views/:viewId/filters',
'/api/v2/meta/views/:viewId/filters',
])
@Acl('filterList')
async filterList(@Param('viewId') viewId: string) {
@ -37,7 +37,7 @@ export class FiltersController {
@Post([
'/api/v1/db/meta/views/:viewId/filters',
'/api/v1/meta/views/:viewId/filters',
'/api/v2/meta/views/:viewId/filters',
])
@HttpCode(200)
@Acl('filterCreate')
@ -56,7 +56,7 @@ export class FiltersController {
@Post([
'/api/v1/db/meta/hooks/:hookId/filters',
'/api/v1/meta/hooks/:hookId/filters',
'/api/v2/meta/hooks/:hookId/filters',
])
@HttpCode(200)
@Acl('hookFilterCreate')
@ -73,7 +73,7 @@ export class FiltersController {
return filter;
}
@Get(['/api/v1/db/meta/filters/:filterId', '/api/v1/meta/filters/:filterId'])
@Get(['/api/v1/db/meta/filters/:filterId', '/api/v2/meta/filters/:filterId'])
@Acl('filterGet')
async filterGet(@Param('filterId') filterId: string) {
return await this.filtersService.filterGet({ filterId });
@ -81,7 +81,7 @@ export class FiltersController {
@Get([
'/api/v1/db/meta/filters/:filterParentId/children',
'/api/v1/meta/filters/:filterParentId/children',
'/api/v2/meta/filters/:filterParentId/children',
])
@Acl('filterChildrenList')
async filterChildrenRead(@Param('filterParentId') filterParentId: string) {
@ -94,7 +94,7 @@ export class FiltersController {
@Patch([
'/api/v1/db/meta/filters/:filterId',
'/api/v1/meta/filters/:filterId',
'/api/v2/meta/filters/:filterId',
])
@Acl('filterUpdate')
async filterUpdate(
@ -112,7 +112,7 @@ export class FiltersController {
@Delete([
'/api/v1/db/meta/filters/:filterId',
'/api/v1/meta/filters/:filterId',
'/api/v2/meta/filters/:filterId',
])
@Acl('filterDelete')
async filterDelete(@Param('filterId') filterId: string, @Req() _req) {
@ -124,7 +124,7 @@ export class FiltersController {
@Get([
'/api/v1/db/meta/hooks/:hookId/filters',
'/api/v1/meta/hooks/:hookId/filters',
'/api/v2/meta/hooks/:hookId/filters',
])
@Acl('hookFilterList')
async hookFilterList(@Param('hookId') hookId: string) {

2
packages/nocodb/src/controllers/form-columns.controller.ts

@ -13,7 +13,7 @@ export class FormColumnsController {
@Patch([
'/api/v1/db/meta/form-columns/:formViewColumnId',
'/api/v1/meta/form-columns/:formViewColumnId',
'/api/v2/meta/form-columns/:formViewColumnId',
])
@Acl('columnUpdate')
async columnUpdate(

6
packages/nocodb/src/controllers/forms.controller.ts

@ -20,7 +20,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard';
export class FormsController {
constructor(private readonly formsService: FormsService) {}
@Get(['/api/v1/db/meta/forms/:formViewId', '/api/v1/meta/forms/:formViewId'])
@Get(['/api/v1/db/meta/forms/:formViewId', '/api/v2/meta/forms/:formViewId'])
@Acl('formViewGet')
async formViewGet(@Param('formViewId') formViewId: string) {
const formViewData = await this.formsService.formViewGet({
@ -31,7 +31,7 @@ export class FormsController {
@Post([
'/api/v1/db/meta/tables/:tableId/forms',
'/api/v1/meta/tables/:tableId/forms',
'/api/v2/meta/tables/:tableId/forms',
])
@HttpCode(200)
@Acl('formViewCreate')
@ -49,7 +49,7 @@ export class FormsController {
}
@Patch([
'/api/v1/db/meta/forms/:formViewId',
'/api/v1/meta/forms/:formViewId',
'/api/v2/meta/forms/:formViewId',
])
@Acl('formViewUpdate')
async formViewUpdate(@Param('formViewId') formViewId: string, @Body() body) {

6
packages/nocodb/src/controllers/galleries.controller.ts

@ -22,7 +22,7 @@ export class GalleriesController {
@Get([
'/api/v1/db/meta/galleries/:galleryViewId',
'/api/v1/meta/galleries/:galleryViewId',
'/api/v2/meta/galleries/:galleryViewId',
])
@Acl('galleryViewGet')
async galleryViewGet(@Param('galleryViewId') galleryViewId: string) {
@ -33,7 +33,7 @@ export class GalleriesController {
@Post([
'/api/v1/db/meta/tables/:tableId/galleries',
'/api/v1/meta/tables/:tableId/galleries',
'/api/v2/meta/tables/:tableId/galleries',
])
@HttpCode(200)
@Acl('galleryViewCreate')
@ -52,7 +52,7 @@ export class GalleriesController {
@Patch([
'/api/v1/db/meta/galleries/:galleryViewId',
'/api/v1/meta/galleries/:galleryViewId',
'/api/v2/meta/galleries/:galleryViewId',
])
@Acl('galleryViewUpdate')
async galleryViewUpdate(

4
packages/nocodb/src/controllers/grid-columns.controller.ts

@ -12,7 +12,7 @@ export class GridColumnsController {
@Get([
'/api/v1/db/meta/grids/:gridViewId/grid-columns',
'/api/v1/meta/grids/:gridViewId/grid-columns',
'/api/v2/meta/grids/:gridViewId/grid-columns',
])
@Acl('columnList')
async columnList(@Param('gridViewId') gridViewId: string) {
@ -22,7 +22,7 @@ export class GridColumnsController {
}
@Patch([
'/api/v1/db/meta/grid-columns/:gridViewColumnId',
'/api/v1/meta/grid-columns/:gridViewColumnId',
'/api/v2/meta/grid-columns/:gridViewColumnId',
])
@Acl('gridColumnUpdate')
async gridColumnUpdate(

4
packages/nocodb/src/controllers/grids.controller.ts

@ -21,7 +21,7 @@ export class GridsController {
@Post([
'/api/v1/db/meta/tables/:tableId/grids/',
'/api/v1/meta/tables/:tableId/grids/',
'/api/v2/meta/tables/:tableId/grids/',
])
@HttpCode(200)
@Acl('gridViewCreate')
@ -36,7 +36,7 @@ export class GridsController {
});
return view;
}
@Patch(['/api/v1/db/meta/grids/:viewId', '/api/v1/meta/grids/:viewId'])
@Patch(['/api/v1/db/meta/grids/:viewId', '/api/v2/meta/grids/:viewId'])
@Acl('gridViewUpdate')
async gridViewUpdate(@Param('viewId') viewId: string, @Body() body) {
return await this.gridsService.gridViewUpdate({

14
packages/nocodb/src/controllers/hooks.controller.ts

@ -25,7 +25,7 @@ export class HooksController {
@Get([
'/api/v1/db/meta/tables/:tableId/hooks',
'/api/v1/meta/tables/:tableId/hooks',
'/api/v2/meta/tables/:tableId/hooks',
])
@Acl('hookList')
async hookList(@Param('tableId') tableId: string) {
@ -34,7 +34,7 @@ export class HooksController {
@Post([
'/api/v1/db/meta/tables/:tableId/hooks',
'/api/v1/meta/tables/:tableId/hooks',
'/api/v2/meta/tables/:tableId/hooks',
])
@HttpCode(200)
@Acl('hookCreate')
@ -49,13 +49,13 @@ export class HooksController {
return hook;
}
@Delete(['/api/v1/db/meta/hooks/:hookId', '/api/v1/meta/hooks/:hookId'])
@Delete(['/api/v1/db/meta/hooks/:hookId', '/api/v2/meta/hooks/:hookId'])
@Acl('hookDelete')
async hookDelete(@Param('hookId') hookId: string) {
return await this.hooksService.hookDelete({ hookId });
}
@Patch(['/api/v1/db/meta/hooks/:hookId', '/api/v1/meta/hooks/:hookId'])
@Patch(['/api/v1/db/meta/hooks/:hookId', '/api/v2/meta/hooks/:hookId'])
@Acl('hookUpdate')
async hookUpdate(@Param('hookId') hookId: string, @Body() body: HookReqType) {
return await this.hooksService.hookUpdate({ hookId, hook: body });
@ -63,7 +63,7 @@ export class HooksController {
@Post([
'/api/v1/db/meta/tables/:tableId/hooks/test',
'/api/v1/meta/tables/:tableId/hooks/test',
'/api/v2/meta/tables/:tableId/hooks/test',
])
@HttpCode(200)
@Acl('hookTest')
@ -88,7 +88,7 @@ export class HooksController {
@Get([
'/api/v1/db/meta/tables/:tableId/hooks/samplePayload/:operation/:version',
'/api/v1/meta/tables/:tableId/hooks/samplePayload/:operation/:version',
'/api/v2/meta/tables/:tableId/hooks/samplePayload/:operation/:version',
])
@Acl('tableSampleData')
async tableSampleData(
@ -105,7 +105,7 @@ export class HooksController {
@Get([
'/api/v1/db/meta/hooks/:hookId/logs',
'/api/v1/meta/hooks/:hookId/logs',
'/api/v2/meta/hooks/:hookId/logs',
])
@Acl('hookLogList')
async hookLogList(@Param('hookId') hookId: string, @Request() req: any) {

6
packages/nocodb/src/controllers/kanbans.controller.ts

@ -22,7 +22,7 @@ export class KanbansController {
@Get([
'/api/v1/db/meta/kanbans/:kanbanViewId',
'/api/v1/meta/kanbans/:kanbanViewId',
'/api/v2/meta/kanbans/:kanbanViewId',
])
@Acl('kanbanViewGet')
async kanbanViewGet(@Param('kanbanViewId') kanbanViewId: string) {
@ -33,7 +33,7 @@ export class KanbansController {
@Post([
'/api/v1/db/meta/tables/:tableId/kanbans',
'/api/v1/meta/tables/:tableId/kanbans',
'/api/v2/meta/tables/:tableId/kanbans',
])
@HttpCode(200)
@Acl('kanbanViewCreate')
@ -51,7 +51,7 @@ export class KanbansController {
@Patch([
'/api/v1/db/meta/kanbans/:kanbanViewId',
'/api/v1/meta/kanbans/:kanbanViewId',
'/api/v2/meta/kanbans/:kanbanViewId',
])
@Acl('kanbanViewUpdate')
async kanbanViewUpdate(

6
packages/nocodb/src/controllers/maps.controller.ts

@ -20,7 +20,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard';
export class MapsController {
constructor(private readonly mapsService: MapsService) {}
@Get(['/api/v1/db/meta/maps/:mapViewId', '/api/v1/meta/maps/:mapViewId'])
@Get(['/api/v1/db/meta/maps/:mapViewId', '/api/v2/meta/maps/:mapViewId'])
@Acl('mapViewGet')
async mapViewGet(@Param('mapViewId') mapViewId: string) {
return await this.mapsService.mapViewGet({ mapViewId });
@ -28,7 +28,7 @@ export class MapsController {
@Post([
'/api/v1/db/meta/tables/:tableId/maps',
'/api/v1/meta/tables/:tableId/maps',
'/api/v2/meta/tables/:tableId/maps',
])
@HttpCode(200)
@Acl('mapViewCreate')
@ -45,7 +45,7 @@ export class MapsController {
return view;
}
@Patch(['/api/v1/db/meta/maps/:mapViewId', '/api/v1/meta/maps/:mapViewId'])
@Patch(['/api/v1/db/meta/maps/:mapViewId', '/api/v2/meta/maps/:mapViewId'])
@Acl('mapViewUpdate')
async mapViewUpdate(
@Param('mapViewId') mapViewId: string,

4
packages/nocodb/src/controllers/meta-diffs.controller.ts

@ -11,7 +11,7 @@ export class MetaDiffsController {
@Get([
'/api/v1/db/meta/projects/:baseId/meta-diff',
'/api/v1/meta/bases/:baseId/meta-diff',
'/api/v2/meta/bases/:baseId/meta-diff',
])
@Acl('metaDiff')
async metaDiff(@Param('baseId') baseId: string) {
@ -20,7 +20,7 @@ export class MetaDiffsController {
@Get([
'/api/v1/db/meta/projects/:baseId/meta-diff/:sourceId',
'/api/v1/meta/bases/:baseId/meta-diff/:sourceId',
'/api/v2/meta/bases/:baseId/meta-diff/:sourceId',
])
@Acl('metaDiff')
async baseMetaDiff(

4
packages/nocodb/src/controllers/model-visibilities.controller.ts

@ -22,7 +22,7 @@ export class ModelVisibilitiesController {
@Post([
'/api/v1/db/meta/projects/:baseId/visibility-rules',
'/api/v1/meta/bases/:baseId/visibility-rules',
'/api/v2/meta/bases/:baseId/visibility-rules',
])
@HttpCode(200)
@Acl('modelVisibilitySet')
@ -40,7 +40,7 @@ export class ModelVisibilitiesController {
@Get([
'/api/v1/db/meta/projects/:baseId/visibility-rules',
'/api/v1/meta/bases/:baseId/visibility-rules',
'/api/v2/meta/bases/:baseId/visibility-rules',
])
@Acl('modelVisibilityList')
async modelVisibilityList(

12
packages/nocodb/src/controllers/plugins.controller.ts

@ -26,7 +26,7 @@ import { MetaApiLimiterGuard } from '~/guards/meta-api-limiter.guard';
export class PluginsController {
constructor(private readonly pluginsService: PluginsService) {}
@Get(['/api/v1/db/meta/plugins', '/api/v1/meta/plugins'])
@Get(['/api/v1/db/meta/plugins', '/api/v2/meta/plugins'])
@Acl('pluginList', {
scope: 'org',
})
@ -34,7 +34,7 @@ export class PluginsController {
return new PagedResponseImpl(await this.pluginsService.pluginList());
}
@Get(['/api/v1/db/meta/plugins/webhook', '/api/v1/meta/plugins/webhook'])
@Get(['/api/v1/db/meta/plugins/webhook', '/api/v2/meta/plugins/webhook'])
@Acl('webhookPluginList', {
scope: 'org',
})
@ -42,7 +42,7 @@ export class PluginsController {
return new PagedResponseImpl(await this.pluginsService.webhookPluginList());
}
@Post(['/api/v1/db/meta/plugins/test', '/api/v1/meta/plugins/test'])
@Post(['/api/v1/db/meta/plugins/test', '/api/v2/meta/plugins/test'])
@HttpCode(200)
@Acl('pluginTest', {
scope: 'org',
@ -51,7 +51,7 @@ export class PluginsController {
return await this.pluginsService.pluginTest({ body: body });
}
@Get(['/api/v1/db/meta/plugins/:pluginId', '/api/v1/meta/plugins/:pluginId'])
@Get(['/api/v1/db/meta/plugins/:pluginId', '/api/v2/meta/plugins/:pluginId'])
@Acl('pluginRead', {
scope: 'org',
})
@ -61,7 +61,7 @@ export class PluginsController {
@Patch([
'/api/v1/db/meta/plugins/:pluginId',
'/api/v1/meta/plugins/:pluginId',
'/api/v2/meta/plugins/:pluginId',
])
@Acl('pluginUpdate', {
scope: 'org',
@ -76,7 +76,7 @@ export class PluginsController {
@Get([
'/api/v1/db/meta/plugins/:pluginTitle/status',
'/api/v1/meta/plugins/:pluginTitle/status',
'/api/v2/meta/plugins/:pluginTitle/status',
])
@Acl('isPluginActive', {
scope: 'org',

8
packages/nocodb/src/controllers/shared-bases.controller.ts

@ -22,7 +22,7 @@ export class SharedBasesController {
@Post([
'/api/v1/db/meta/projects/:baseId/shared',
'/api/v1/meta/bases/:baseId/shared',
'/api/v2/meta/bases/:baseId/shared',
])
@HttpCode(200)
@Acl('createSharedBaseLink')
@ -43,7 +43,7 @@ export class SharedBasesController {
@Patch([
'/api/v1/db/meta/projects/:baseId/shared',
'/api/v1/meta/bases/:baseId/shared',
'/api/v2/meta/bases/:baseId/shared',
])
@Acl('updateSharedBaseLink')
async updateSharedBaseLink(
@ -63,7 +63,7 @@ export class SharedBasesController {
@Delete([
'/api/v1/db/meta/projects/:baseId/shared',
'/api/v1/meta/bases/:baseId/shared',
'/api/v2/meta/bases/:baseId/shared',
])
@Acl('disableSharedBaseLink')
async disableSharedBaseLink(@Param('baseId') baseId: string): Promise<any> {
@ -76,7 +76,7 @@ export class SharedBasesController {
@Get([
'/api/v1/db/meta/projects/:baseId/shared',
'/api/v1/meta/bases/:baseId/shared',
'/api/v2/meta/bases/:baseId/shared',
])
@Acl('getSharedBaseLink')
async getSharedBaseLink(

10
packages/nocodb/src/controllers/sorts.controller.ts

@ -24,7 +24,7 @@ export class SortsController {
@Get([
'/api/v1/db/meta/views/:viewId/sorts/',
'/api/v1/meta/views/:viewId/sorts/',
'/api/v2/meta/views/:viewId/sorts/',
])
@Acl('sortList')
async sortList(@Param('viewId') viewId: string) {
@ -37,7 +37,7 @@ export class SortsController {
@Post([
'/api/v1/db/meta/views/:viewId/sorts/',
'/api/v1/meta/views/:viewId/sorts/',
'/api/v2/meta/views/:viewId/sorts/',
])
@HttpCode(200)
@Acl('sortCreate')
@ -53,7 +53,7 @@ export class SortsController {
return sort;
}
@Get(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId'])
@Get(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId'])
@Acl('sortGet')
async sortGet(@Param('sortId') sortId: string) {
const sort = await this.sortsService.sortGet({
@ -62,7 +62,7 @@ export class SortsController {
return sort;
}
@Patch(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId'])
@Patch(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId'])
@Acl('sortUpdate')
async sortUpdate(
@Param('sortId') sortId: string,
@ -76,7 +76,7 @@ export class SortsController {
return sort;
}
@Delete(['/api/v1/db/meta/sorts/:sortId', '/api/v1/meta/sorts/:sortId'])
@Delete(['/api/v1/db/meta/sorts/:sortId', '/api/v2/meta/sorts/:sortId'])
@Acl('sortDelete')
async sortDelete(@Param('sortId') sortId: string, @Req() _req) {
const sort = await this.sortsService.sortDelete({

6
packages/nocodb/src/controllers/sources.controller.ts

@ -13,7 +13,7 @@ export class SourcesController {
@Get([
'/api/v1/db/meta/projects/:baseId/bases/:sourceId',
'/api/v1/meta/bases/:baseId/sources/:sourceId',
'/api/v2/meta/bases/:baseId/sources/:sourceId',
])
@Acl('baseGet')
async baseGet(@Param('sourceId') sourceId: string) {
@ -30,7 +30,7 @@ export class SourcesController {
@Patch([
'/api/v1/db/meta/projects/:baseId/bases/:sourceId',
'/api/v1/meta/bases/:baseId/sources/:sourceId',
'/api/v2/meta/bases/:baseId/sources/:sourceId',
])
@Acl('baseUpdate')
async baseUpdate(
@ -49,7 +49,7 @@ export class SourcesController {
@Get([
'/api/v1/db/meta/projects/:baseId/bases',
'/api/v1/meta/bases/:baseId/sources',
'/api/v2/meta/bases/:baseId/sources',
])
@Acl('baseList')
async baseList(@Param('baseId') baseId: string) {

2
packages/nocodb/src/controllers/sql-views.controller.ts

@ -18,7 +18,7 @@ export class SqlViewsController {
@Post([
'/api/v1/db/meta/projects/:baseId/bases/:sourceId/sqlView',
'/api/v1/meta/bases/:baseId/sources/:sourceId/sqlView',
'/api/v2/meta/bases/:baseId/sources/:sourceId/sqlView',
])
@Acl('sqlViewCreate')
async sqlViewCreate(

12
packages/nocodb/src/controllers/sync.controller.ts

@ -23,8 +23,8 @@ export class SyncController {
@Get([
'/api/v1/db/meta/projects/:baseId/syncs',
'/api/v1/db/meta/projects/:baseId/syncs/:sourceId',
'/api/v1/meta/bases/:baseId/syncs',
'/api/v1/meta/bases/:baseId/syncs/:sourceId',
'/api/v2/meta/bases/:baseId/syncs',
'/api/v2/meta/bases/:baseId/syncs/:sourceId',
])
@Acl('syncSourceList')
async syncSourceList(
@ -40,8 +40,8 @@ export class SyncController {
@Post([
'/api/v1/db/meta/projects/:baseId/syncs',
'/api/v1/db/meta/projects/:baseId/syncs/:sourceId',
'/api/v1/meta/bases/:baseId/syncs',
'/api/v1/meta/bases/:baseId/syncs/:sourceId',
'/api/v2/meta/bases/:baseId/syncs',
'/api/v2/meta/bases/:baseId/syncs/:sourceId',
])
@HttpCode(200)
@Acl('syncSourceCreate')
@ -59,7 +59,7 @@ export class SyncController {
});
}
@Delete(['/api/v1/db/meta/syncs/:syncId', '/api/v1/meta/syncs/:syncId'])
@Delete(['/api/v1/db/meta/syncs/:syncId', '/api/v2/meta/syncs/:syncId'])
@Acl('syncSourceDelete')
async syncDelete(@Param('syncId') syncId: string) {
return await this.syncService.syncDelete({
@ -67,7 +67,7 @@ export class SyncController {
});
}
@Patch(['/api/v1/db/meta/syncs/:syncId', '/api/v1/meta/syncs/:syncId'])
@Patch(['/api/v1/db/meta/syncs/:syncId', '/api/v2/meta/syncs/:syncId'])
@Acl('syncSourceUpdate')
async syncUpdate(@Param('syncId') syncId: string, @Body() body: any) {
return await this.syncService.syncUpdate({

16
packages/nocodb/src/controllers/tables.controller.ts

@ -26,8 +26,8 @@ export class TablesController {
@Get([
'/api/v1/db/meta/projects/:baseId/tables',
'/api/v1/db/meta/projects/:baseId/:sourceId/tables',
'/api/v1/meta/bases/:baseId/tables',
'/api/v1/meta/bases/:baseId/:sourceId/tables',
'/api/v2/meta/bases/:baseId/tables',
'/api/v2/meta/bases/:baseId/:sourceId/tables',
])
@Acl('tableList')
async tableList(
@ -49,8 +49,8 @@ export class TablesController {
@Post([
'/api/v1/db/meta/projects/:baseId/tables',
'/api/v1/db/meta/projects/:baseId/:sourceId/tables',
'/api/v1/meta/bases/:baseId/tables',
'/api/v1/meta/bases/:baseId/:sourceId/tables',
'/api/v2/meta/bases/:baseId/tables',
'/api/v2/meta/bases/:baseId/:sourceId/tables',
])
@HttpCode(200)
@Acl('tableCreate')
@ -70,7 +70,7 @@ export class TablesController {
return result;
}
@Get(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId'])
@Get(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId'])
@Acl('tableGet')
async tableGet(@Param('tableId') tableId: string, @Request() req) {
const table = await this.tablesService.getTableWithAccessibleViews({
@ -81,7 +81,7 @@ export class TablesController {
return table;
}
@Patch(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId'])
@Patch(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId'])
@Acl('tableUpdate')
async tableUpdate(
@Param('tableId') tableId: string,
@ -97,7 +97,7 @@ export class TablesController {
return { msg: 'The table has been updated successfully' };
}
@Delete(['/api/v1/db/meta/tables/:tableId', '/api/v1/meta/tables/:tableId'])
@Delete(['/api/v1/db/meta/tables/:tableId', '/api/v2/meta/tables/:tableId'])
@Acl('tableDelete')
async tableDelete(@Param('tableId') tableId: string, @Request() req) {
const result = await this.tablesService.tableDelete({
@ -111,7 +111,7 @@ export class TablesController {
@Post([
'/api/v1/db/meta/tables/:tableId/reorder',
'/api/v1/meta/tables/:tableId/reorder',
'/api/v2/meta/tables/:tableId/reorder',
])
@Acl('tableReorder')
@HttpCode(200)

6
packages/nocodb/src/controllers/utils.controller.ts

@ -39,7 +39,7 @@ export class UtilsController {
}
@UseGuards(MetaApiLimiterGuard, GlobalGuard)
@Post(['/api/v1/db/meta/connection/test', '/api/v1/meta/connection/test'])
@Post(['/api/v1/db/meta/connection/test', '/api/v2/meta/connection/test'])
@Acl('testConnection', {
scope: 'org',
})
@ -49,7 +49,7 @@ export class UtilsController {
}
@UseGuards(PublicApiLimiterGuard)
@Get(['/api/v1/db/meta/nocodb/info', '/api/v1/meta/nocodb/info'])
@Get(['/api/v1/db/meta/nocodb/info', '/api/v2/meta/nocodb/info'])
async appInfo(@Request() req) {
return await this.utilsService.appInfo({
req: {
@ -65,7 +65,7 @@ export class UtilsController {
}
@UseGuards(PublicApiLimiterGuard)
@Post(['/api/v1/db/meta/axiosRequestMake', '/api/v1/meta/axiosRequestMake'])
@Post(['/api/v1/db/meta/axiosRequestMake', '/api/v2/meta/axiosRequestMake'])
@HttpCode(200)
async axiosRequestMake(@Body() body: any) {
return await this.utilsService.axiosRequestMake({ body });

6
packages/nocodb/src/controllers/view-columns.controller.ts

@ -22,7 +22,7 @@ export class ViewColumnsController {
@Get([
'/api/v1/db/meta/views/:viewId/columns/',
'/api/v1/meta/views/:viewId/columns/',
'/api/v2/meta/views/:viewId/columns/',
])
@Acl('columnList')
async columnList(@Param('viewId') viewId: string) {
@ -35,7 +35,7 @@ export class ViewColumnsController {
@Post([
'/api/v1/db/meta/views/:viewId/columns/',
'/api/v1/meta/views/:viewId/columns/',
'/api/v2/meta/views/:viewId/columns/',
])
@HttpCode(200)
@Acl('columnAdd')
@ -52,7 +52,7 @@ export class ViewColumnsController {
@Patch([
'/api/v1/db/meta/views/:viewId/columns/:columnId',
'/api/v1/meta/views/:viewId/columns/:columnId',
'/api/v2/meta/views/:viewId/columns/:columnId',
])
@Acl('columnUpdate')
async columnUpdate(

18
packages/nocodb/src/controllers/views.controller.ts

@ -25,7 +25,7 @@ export class ViewsController {
@Get([
'/api/v1/db/meta/tables/:tableId/views',
'/api/v1/meta/tables/:tableId/views',
'/api/v2/meta/tables/:tableId/views',
])
@Acl('viewList')
async viewList(@Param('tableId') tableId: string, @Request() req) {
@ -37,7 +37,7 @@ export class ViewsController {
);
}
@Patch(['/api/v1/db/meta/views/:viewId', '/api/v1/meta/views/:viewId'])
@Patch(['/api/v1/db/meta/views/:viewId', '/api/v2/meta/views/:viewId'])
@Acl('viewUpdate')
async viewUpdate(
@Param('viewId') viewId: string,
@ -52,7 +52,7 @@ export class ViewsController {
return result;
}
@Delete(['/api/v1/db/meta/views/:viewId', '/api/v1/meta/views/:viewId'])
@Delete(['/api/v1/db/meta/views/:viewId', '/api/v2/meta/views/:viewId'])
@Acl('viewDelete')
async viewDelete(@Param('viewId') viewId: string, @Request() req) {
const result = await this.viewsService.viewDelete({
@ -64,7 +64,7 @@ export class ViewsController {
@Post([
'/api/v1/db/meta/views/:viewId/show-all',
'/api/v1/meta/views/:viewId/show-all',
'/api/v2/meta/views/:viewId/show-all',
])
@HttpCode(200)
@Acl('showAllColumns')
@ -79,7 +79,7 @@ export class ViewsController {
}
@Post([
'/api/v1/db/meta/views/:viewId/hide-all',
'/api/v1/meta/views/:viewId/hide-all',
'/api/v2/meta/views/:viewId/hide-all',
])
@HttpCode(200)
@Acl('hideAllColumns')
@ -95,7 +95,7 @@ export class ViewsController {
@Post([
'/api/v1/db/meta/views/:viewId/share',
'/api/v1/meta/views/:viewId/share',
'/api/v2/meta/views/:viewId/share',
])
@HttpCode(200)
@Acl('shareView')
@ -105,7 +105,7 @@ export class ViewsController {
@Get([
'/api/v1/db/meta/tables/:tableId/share',
'/api/v1/meta/tables/:tableId/share',
'/api/v2/meta/tables/:tableId/share',
])
@Acl('shareViewList')
async shareViewList(@Param('tableId') tableId: string) {
@ -118,7 +118,7 @@ export class ViewsController {
@Patch([
'/api/v1/db/meta/views/:viewId/share',
'/api/v1/meta/views/:viewId/share',
'/api/v2/meta/views/:viewId/share',
])
@Acl('shareViewUpdate')
async shareViewUpdate(
@ -135,7 +135,7 @@ export class ViewsController {
@Delete([
'/api/v1/db/meta/views/:viewId/share',
'/api/v1/meta/views/:viewId/share',
'/api/v2/meta/views/:viewId/share',
])
@Acl('shareViewDelete')
async shareViewDelete(@Param('viewId') viewId: string, @Request() req) {

10
packages/nocodb/src/middlewares/extract-ids/extract-ids.middleware.ts

@ -128,8 +128,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate {
[
'/api/v1/db/meta/audits/rows/:rowId/update',
'/api/v1/db/meta/audits/comments',
'/api/v1/meta/audits/rows/:rowId/update',
'/api/v1/meta/audits/comments',
'/api/v2/meta/audits/rows/:rowId/update',
'/api/v2/meta/audits/comments',
].some(
(auditInsertOrUpdatePath) => req.route.path === auditInsertOrUpdatePath,
) &&
@ -146,8 +146,8 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate {
[
'/api/v1/db/meta/audits/comments/count',
'/api/v1/db/meta/audits/comments',
'/api/v1/meta/audits/comments/count',
'/api/v1/meta/audits/comments',
'/api/v2/meta/audits/comments/count',
'/api/v2/meta/audits/comments',
].some((auditReadPath) => req.route.path === auditReadPath) &&
req.method === 'GET' &&
req.query.fk_model_id
@ -165,7 +165,7 @@ export class ExtractIdsMiddleware implements NestMiddleware, CanActivate {
'/api/v1/auth/user/me',
'/api/v1/auth/user/me',
'/api/v1/db/meta/plugins/webhook',
'/api/v1/meta/plugins/webhook',
'/api/v2/meta/plugins/webhook',
].some((userMePath) => req.route.path === userMePath) &&
req.query.base_id
) {

4
packages/nocodb/src/modules/jobs/jobs/at-import/at-import.controller.ts

@ -20,7 +20,7 @@ export class AtImportController {
@Post([
'/api/v1/db/meta/syncs/:syncId/trigger',
'/api/v1/meta/syncs/:syncId/trigger',
'/api/v2/meta/syncs/:syncId/trigger',
])
@Acl('airtableImport')
@HttpCode(200)
@ -60,7 +60,7 @@ export class AtImportController {
@Post([
'/api/v1/db/meta/syncs/:syncId/abort',
'/api/v1/meta/syncs/:syncId/abort',
'/api/v2/meta/syncs/:syncId/abort',
])
@Acl('airtableImport')
@HttpCode(200)

4
packages/nocodb/src/modules/jobs/jobs/export-import/duplicate.controller.ts

@ -94,7 +94,7 @@ export class DuplicateController {
@Post([
'/api/v1/db/meta/duplicate/:baseId/:sourceId?',
'/api/v1/meta/duplicate/:baseId/:sourceId?',
'/api/v2/meta/duplicate/:baseId/:sourceId?',
])
@HttpCode(200)
@Acl('duplicateBase')
@ -159,7 +159,7 @@ export class DuplicateController {
@Post([
'/api/v1/db/meta/duplicate/:baseId/table/:modelId',
'/api/v1/meta/duplicate/:baseId/table/:modelId',
'/api/v2/meta/duplicate/:baseId/table/:modelId',
])
@HttpCode(200)
@Acl('duplicateModel')

4
packages/nocodb/src/modules/jobs/jobs/meta-sync/meta-sync.controller.ts

@ -20,7 +20,7 @@ export class MetaSyncController {
@Post([
'/api/v1/db/meta/projects/:baseId/meta-diff',
'/api/v1/meta/bases/:baseId/meta-diff',
'/api/v2/meta/bases/:baseId/meta-diff',
])
@HttpCode(200)
@Acl('metaDiffSync')
@ -45,7 +45,7 @@ export class MetaSyncController {
@Post([
'/api/v1/db/meta/projects/:baseId/meta-diff/:sourceId',
'/api/v1/meta/bases/:baseId/meta-diff/:sourceId',
'/api/v2/meta/bases/:baseId/meta-diff/:sourceId',
])
@HttpCode(200)
@Acl('baseMetaDiffSync')

2
packages/nocodb/src/modules/jobs/jobs/source-create/source-create.controller.ts

@ -21,7 +21,7 @@ export class SourceCreateController {
@Post([
'/api/v1/db/meta/projects/:baseId/sources',
'/api/v1/meta/bases/:baseId/sources',
'/api/v2/meta/bases/:baseId/sources',
])
@HttpCode(200)
@Acl('baseCreate')

2
packages/nocodb/src/modules/jobs/jobs/source-delete/source-delete.controller.ts

@ -16,7 +16,7 @@ export class SourceDeleteController {
@Delete([
'/api/v1/db/meta/projects/:baseId/bases/:sourceId',
'/api/v1/meta/bases/:baseId/sources/:sourceId',
'/api/v2/meta/bases/:baseId/sources/:sourceId',
])
@Acl('baseDelete')
async baseDelete(@Param('sourceId') sourceId: string) {

2
packages/nocodb/tests/unit/rest/tests/base.test.ts

@ -111,7 +111,7 @@ function baseTest() {
// title: 'deletedTitle',
// });
// await request(app)
// .delete('/api/v1/meta/bases/${toBeDeletedProject.id}')
// .delete('/api/v1/db/meta/bases/${toBeDeletedProject.id}')
// .set('xc-auth', token)
// .send({
// title: 'Title1',

Loading…
Cancel
Save