From 3d91489f12e0b453697e193d4d20098667b05dba Mon Sep 17 00:00:00 2001 From: clucraft Date: Fri, 23 Jan 2026 09:32:49 -0500 Subject: [PATCH] Fix AI verification toggle not persisting The GET and PUT /api/settings/ai endpoints were missing ai_verification_enabled in the request/response handling. Co-Authored-By: Claude Opus 4.5 --- backend/src/routes/settings.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/routes/settings.ts b/backend/src/routes/settings.ts index fa32cb3..6e809aa 100644 --- a/backend/src/routes/settings.ts +++ b/backend/src/routes/settings.ts @@ -239,6 +239,7 @@ router.get('/ai', async (req: AuthRequest, res: Response) => { res.json({ ai_enabled: settings.ai_enabled || false, + ai_verification_enabled: settings.ai_verification_enabled || false, ai_provider: settings.ai_provider || null, anthropic_api_key: settings.anthropic_api_key || null, openai_api_key: settings.openai_api_key || null, @@ -255,10 +256,11 @@ router.get('/ai', async (req: AuthRequest, res: Response) => { router.put('/ai', async (req: AuthRequest, res: Response) => { try { const userId = req.userId!; - const { ai_enabled, ai_provider, anthropic_api_key, openai_api_key, ollama_base_url, ollama_model } = req.body; + const { ai_enabled, ai_verification_enabled, ai_provider, anthropic_api_key, openai_api_key, ollama_base_url, ollama_model } = req.body; const settings = await userQueries.updateAISettings(userId, { ai_enabled, + ai_verification_enabled, ai_provider, anthropic_api_key, openai_api_key, @@ -273,6 +275,7 @@ router.put('/ai', async (req: AuthRequest, res: Response) => { res.json({ ai_enabled: settings.ai_enabled || false, + ai_verification_enabled: settings.ai_verification_enabled || false, ai_provider: settings.ai_provider || null, anthropic_api_key: settings.anthropic_api_key || null, openai_api_key: settings.openai_api_key || null,