Commit 6be0914b by 1808837298@qq.com

fix: Simplify Claude settings value conversion logic

parent 58a9c636
...@@ -31,12 +31,8 @@ export default function SettingClaudeModel(props) { ...@@ -31,12 +31,8 @@ export default function SettingClaudeModel(props) {
const updateArray = compareObjects(inputs, inputsRow); const updateArray = compareObjects(inputs, inputsRow);
if (!updateArray.length) return showWarning(t('你似乎并没有修改什么')); if (!updateArray.length) return showWarning(t('你似乎并没有修改什么'));
const requestQueue = updateArray.map((item) => { const requestQueue = updateArray.map((item) => {
let value = ''; let value = String(inputs[item.key]);
if (typeof inputs[item.key] === 'boolean') {
value = String(inputs[item.key]);
} else {
value = inputs[item.key];
}
return API.put('/api/option/', { return API.put('/api/option/', {
key: item.key, key: item.key,
value, value,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment