From 46772b4f2a629094a74b77f705db06fde3d7ea0b Mon Sep 17 00:00:00 2001 From: icarus Date: Mon, 20 Oct 2025 08:39:46 +0800 Subject: [PATCH] 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. --- src/renderer/src/hooks/ocr/useOcrProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/hooks/ocr/useOcrProvider.ts b/src/renderer/src/hooks/ocr/useOcrProvider.ts index 87872a55f0..efbef9f9c6 100644 --- a/src/renderer/src/hooks/ocr/useOcrProvider.ts +++ b/src/renderer/src/hooks/ocr/useOcrProvider.ts @@ -17,12 +17,12 @@ export const useOcrProvider = (id: string) => { const updateConfig = useCallback( async (update: Partial) => { 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 {