From 550d123534c42fd7a9c6bef437e209fcdb6e817a Mon Sep 17 00:00:00 2001 From: mindesbunister Date: Thu, 24 Jul 2025 17:46:12 +0200 Subject: [PATCH] fix: Resolve syntax errors and complete automation fixes - Fixed duplicate function declaration causing module build error - Added missing selectedTimeframes parameter to destructuring - Cleaned up API route structure for proper parameter handling Both major issues now resolved: Trading mode respected: LIVE/SIMULATION choice from UI works correctly Stop functionality working: Automation properly stops when requested Verified with tests: - LIVE mode session created with user's trading amount (200) - Stop command successfully terminates automation - Database correctly updated to STOPPED status --- app/api/analysis-optimized/route.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/api/analysis-optimized/route.js b/app/api/analysis-optimized/route.js index 7293c5b..fc3c545 100644 --- a/app/api/analysis-optimized/route.js +++ b/app/api/analysis-optimized/route.js @@ -4,13 +4,11 @@ import { batchAIAnalysisService } from '../../../lib/ai-analysis-batch' import { progressTracker } from '../../../lib/progress-tracker' export async function POST(request) { - try { - const body = await request.json() - export async function POST(request) { try { const { symbol, timeframes, + selectedTimeframes, // Add this field layouts = ['ai', 'diy'], analyze = true, automationMode = false,