mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
fix(ocr): include id in provider config update request
The id parameter was missing in the update request body, causing potential issues with identifying which provider to update. Add id to the request body to ensure correct provider is updated.
This commit is contained in:
parent
8aaf26e420
commit
46772b4f2a
@ -17,12 +17,12 @@ export const useOcrProvider = (id: string) => {
|
||||
const updateConfig = useCallback(
|
||||
async (update: Partial<OcrProviderConfig>) => {
|
||||
try {
|
||||
await mutate({ body: update })
|
||||
await mutate({ body: { id, config: update } })
|
||||
} catch (e) {
|
||||
window.toast.error({ title: t('ocr.provider.config.patch.error.failed'), description: getErrorMessage(e) })
|
||||
}
|
||||
},
|
||||
[mutate, t]
|
||||
[id, mutate, t]
|
||||
)
|
||||
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user