refactor: streamline value assignment in SettingGeminiModel

This commit is contained in:
CaIon
2025-04-18 20:08:26 +08:00
parent 4c4dc6e8b4
commit 0755ac9991

View File

@@ -38,12 +38,7 @@ export default function SettingGeminiModel(props) {
const updateArray = compareObjects(inputs, inputsRow);
if (!updateArray.length) return showWarning(t('你似乎并没有修改什么'));
const requestQueue = updateArray.map((item) => {
let value = '';
if (typeof inputs[item.key] === 'boolean') {
value = String(inputs[item.key]);
} else {
value = inputs[item.key];
}
let value = String(inputs[item.key]);
return API.put('/api/option/', {
key: item.key,
value,