.
This commit is contained in:
@@ -87,6 +87,20 @@ public class MarketingController {
|
|||||||
return unauthorizedResponse();
|
return unauthorizedResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TEMP: We use only V2 generate for now.
|
||||||
|
// Disable the legacy (v1) start endpoint to avoid creating duplicate/old-format
|
||||||
|
// analyses.
|
||||||
|
// NOTE: Keep this behind a non-constant condition to avoid "unreachable code"
|
||||||
|
// errors.
|
||||||
|
boolean legacyGenerateDisabled = true;
|
||||||
|
if (legacyGenerateDisabled) {
|
||||||
|
ErrorResponse disabledError = new ErrorResponse(
|
||||||
|
"ENDPOINT_DISABLED",
|
||||||
|
"Обычный generate временно отключен. Используйте V2: POST /api/marketing/analysis/start/v2");
|
||||||
|
return ResponseEntity.status(HttpStatus.GONE)
|
||||||
|
.body(ApiResponse.error("Обычный generate временно отключен", disabledError));
|
||||||
|
}
|
||||||
|
|
||||||
// Create unified analysis with all analysis types
|
// Create unified analysis with all analysis types
|
||||||
List<MarketingAnalysis> analyses = marketingAnalysisService.startAnalysis(request, userId);
|
List<MarketingAnalysis> analyses = marketingAnalysisService.startAnalysis(request, userId);
|
||||||
MarketingAnalysis analysis = analyses.get(0);
|
MarketingAnalysis analysis = analyses.get(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user