fix(frontend): 修复供应商开关切换不能实时生效的问题

This commit is contained in:
liang09255
2026-05-02 21:51:33 +08:00
parent 8fa3101f0f
commit c9ab763f1b
5 changed files with 44 additions and 33 deletions

View File

@@ -77,11 +77,14 @@ def update_provider(data: ProviderUpdateRequest):
):
return R.error(msg='请至少填写一个参数')
provider_id =ProviderService.update_provider(
updated_provider =ProviderService.update_provider(
id=data.id,
data=dict(data)
)
return R.success(msg='更新模型供应商成功',data={'id': provider_id})
if updated_provider:
return R.success(msg='更新模型供应商成功', data=updated_provider)
else:
return R.error(msg='更新模型供应商失败')
except Exception as e:
print(e)
return R.error(msg=str(e))