From f5f87fdd1ff8a1431c7b01b230a19b1d45a36210 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 1 Jul 2026 19:22:12 +0000 Subject: [PATCH] Always return all schema config fields in maskRow Config object starts empty so the frontend had nothing to render for plaintext fields (region, username etc). Now populates all schema-defined fields with empty string when not yet saved. Co-Authored-By: Claude Sonnet 4.6 --- src/routes/integrations.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/integrations.js b/src/routes/integrations.js index 6cef6c3..07abeec 100644 --- a/src/routes/integrations.js +++ b/src/routes/integrations.js @@ -12,12 +12,17 @@ function decryptSecrets(row) { function maskRow(row) { const schema = INTEGRATIONS[row.slug] + // Always return all schema-defined config fields, even if not yet saved + const config = {} + for (const f of schema?.configFields ?? []) { + config[f] = row.config?.[f] ?? '' + } const existing = decryptSecrets(row) const masked = {} for (const f of schema?.secretFields ?? []) { masked[f] = existing[f] ? MASKED : null } - return { slug: row.slug, name: row.name, config: row.config, secrets: masked, enabled: row.enabled, updated_at: row.updated_at } + return { slug: row.slug, name: row.name, config, secrets: masked, enabled: row.enabled, updated_at: row.updated_at } } export async function integrationRoutes(app) {