From 12425d147f3ec0c202b2d9a347836d5515e9b702 Mon Sep 17 00:00:00 2001 From: jeffusion Date: Wed, 4 Mar 2026 17:29:28 +0800 Subject: [PATCH] fix(config): silently skip readonly fields on save instead of rejecting Frontend sends entire form state including readonly fields (PORT, WEBHOOK_SECRET, JWT_SECRET). Previously the backend rejected the whole request. Now readonly fields are silently skipped. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) --- src/controllers/config.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/config.ts b/src/controllers/config.ts index 556e62c..989eea2 100644 --- a/src/controllers/config.ts +++ b/src/controllers/config.ts @@ -231,9 +231,8 @@ configRouter.put('/', async (c) => { errors.push(`未知配置项: ${key}`); continue; } - // Reject readonly fields + // Silently skip readonly fields — frontend sends entire form state if (field.readonly) { - errors.push(`${field.label}(${key})为只读配置,无法通过 GUI 修改`); continue; }