mirror of
https://github.com/jeffusion/gitea-ai-assistant.git
synced 2026-03-27 10:05:50 +00:00
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)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user