diff --git a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts index 82c651744d..90cbd51c28 100644 --- a/packages/nocodb/src/controllers/bulk-data-alias.controller.ts +++ b/packages/nocodb/src/controllers/bulk-data-alias.controller.ts @@ -20,9 +20,7 @@ import { DataApiLimiterGuard } from '~/guards/data-api-limiter.guard'; export class BulkDataAliasController { constructor(private bulkDataAliasService: BulkDataAliasService) {} - @Post([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - ]) + @Post(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @HttpCode(200) @Acl('bulkDataInsert') async bulkDataInsert( @@ -42,9 +40,7 @@ export class BulkDataAliasController { res.json(exists); } - @Patch([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - ]) + @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataUpdate') async bulkDataUpdate( @Request() req, @@ -61,9 +57,7 @@ export class BulkDataAliasController { } // todo: Integrate with filterArrJson bulkDataUpdateAll - @Patch([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all', - ]) + @Patch(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataUpdateAll') async bulkDataUpdateAll( @Request() req, @@ -80,9 +74,7 @@ export class BulkDataAliasController { }); } - @Delete([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName', - ]) + @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName']) @Acl('bulkDataDelete') async bulkDataDelete( @Request() req, @@ -100,9 +92,7 @@ export class BulkDataAliasController { // todo: Integrate with filterArrJson bulkDataDeleteAll - @Delete([ - '/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all', - ]) + @Delete(['/api/v1/db/data/bulk/:orgs/:baseName/:tableName/all']) @Acl('bulkDataDeleteAll') async bulkDataDeleteAll( @Request() req, diff --git a/packages/nocodb/src/controllers/data-alias-nested.controller.ts b/packages/nocodb/src/controllers/data-alias-nested.controller.ts index b59d5f5b09..616ac033ee 100644 --- a/packages/nocodb/src/controllers/data-alias-nested.controller.ts +++ b/packages/nocodb/src/controllers/data-alias-nested.controller.ts @@ -19,9 +19,7 @@ export class DataAliasNestedController { constructor(private dataAliasNestedService: DataAliasNestedService) {} // todo: handle case where the given column is not ltar - @Get([ - '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName', - ]) + @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/mm/:columnName']) @Acl('mmList') async mmList( @Request() req, @@ -101,9 +99,7 @@ export class DataAliasNestedController { // todo: handle case where the given column is not ltar - @Get([ - '/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName', - ]) + @Get(['/api/v1/db/data/:orgs/:baseName/:tableName/:rowId/hm/:columnName']) @Acl('hmList') async hmList( @Request() req, diff --git a/packages/nocodb/src/models/Base.ts b/packages/nocodb/src/models/Base.ts index 7b49609537..eb4363d7c9 100644 --- a/packages/nocodb/src/models/Base.ts +++ b/packages/nocodb/src/models/Base.ts @@ -387,7 +387,7 @@ export default class Base implements BaseType { return baseData?.id && this.get(baseData?.id, ncMeta); } - static async getByTitleOrId(titleOrId: string, ncMeta = Noco.ncMeta) { + static async getByTitleOrId(titleOrId: string, ncMeta = Noco.ncMeta) { const baseId = titleOrId && (await NocoCache.get( diff --git a/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts b/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts index 0e474cb21a..c7cd06ec3e 100644 --- a/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts +++ b/packages/nocodb/src/services/api-docs/swagger/templates/paths.ts @@ -446,28 +446,29 @@ export const getModelPaths = async (ctx: { : {}), } : {}), - [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: { - parameters: [exportTypeParam], - get: { - summary: 'Rows export', - operationId: `${ctx.tableName.toLowerCase()}-csv-export`, - description: - 'Export all the records from a table.Currently we are only supports `csv` export.', - tags: [ctx.tableName], - responses: { - '200': { - description: 'OK', - content: { - 'application/octet-stream': { - schema: {}, + [`/api/v1/db/data/${ctx.orgs}/${ctx.baseName}/${ctx.tableName}/export/{type}`]: + { + parameters: [exportTypeParam], + get: { + summary: 'Rows export', + operationId: `${ctx.tableName.toLowerCase()}-csv-export`, + description: + 'Export all the records from a table.Currently we are only supports `csv` export.', + tags: [ctx.tableName], + responses: { + '200': { + description: 'OK', + content: { + 'application/octet-stream': { + schema: {}, + }, }, + headers: csvExportResponseHeader, }, - headers: csvExportResponseHeader, }, + parameters: [csvExportOffsetParam], }, - parameters: [csvExportOffsetParam], }, - }, }); export const getViewPaths = async (ctx: {