From 859ec85fe96ec188c0ee583c5d37c44d1ac3969b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 14 Mar 2023 16:13:28 +0000 Subject: [PATCH] Fix for schema endpoint, needed secrets removed as well. --- packages/server/src/api/controllers/datasource.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index d212f7f361..3d41cd89af 100644 --- a/packages/server/src/api/controllers/datasource.ts +++ b/packages/server/src/api/controllers/datasource.ts @@ -84,8 +84,9 @@ export async function buildSchemaFromDb(ctx: UserCtx) { setDefaultDisplayColumns(datasource) const dbResp = await db.put(datasource) datasource._rev = dbResp.rev + const cleanedDatasource = await sdk.datasources.removeSecretSingle(datasource) - const response: any = { datasource } + const response: any = { datasource: cleanedDatasource } if (error) { response.error = error }