diff --git a/packages/nocodb/src/controllers/sources.controller.ts b/packages/nocodb/src/controllers/sources.controller.ts index e2532a3b5f..5a4bd897f9 100644 --- a/packages/nocodb/src/controllers/sources.controller.ts +++ b/packages/nocodb/src/controllers/sources.controller.ts @@ -37,6 +37,7 @@ export class SourcesController { if (source.isMeta()) { source.config = undefined; } + source.integration_config = undefined; return source; } @@ -60,6 +61,9 @@ export class SourcesController { req, }); + source.config = undefined; + source.integration_config = undefined; + return source; } @@ -77,9 +81,8 @@ export class SourcesController { }); for (const source of sources) { - if (source.isMeta()) { - source.config = undefined; - } + source.config = undefined; + source.integration_config = undefined; } return new PagedResponseImpl(sources, { diff --git a/packages/nocodb/src/services/sources.service.ts b/packages/nocodb/src/services/sources.service.ts index f3e833bb25..f2551509e7 100644 --- a/packages/nocodb/src/services/sources.service.ts +++ b/packages/nocodb/src/services/sources.service.ts @@ -21,6 +21,10 @@ export class SourcesService { async baseGetWithConfig(context: NcContext, param: { sourceId: any }) { const source = await Source.get(context, param.sourceId); + if (!source) { + NcError.sourceNotFound(param.sourceId); + } + source.config = await source.getSourceConfig(); return source;