File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -61,22 +61,15 @@ export const registerValidationRoutes = (app: Express) => {
6161 const data = req . body ;
6262 const context = new RuleExecutionContext ( ) ;
6363
64- if ( ! data || ! data . result || ! Array . isArray ( data . result ) ) {
65- return res . status ( 400 ) . json ( { error : 'Invalid data format. Expected an object with a "result " array.' } ) ;
64+ if ( ! data || ! Array . isArray ( data . report ) ) {
65+ return res . status ( 400 ) . json ( { error : 'Invalid data format. Expected an object with a "report " array.' } ) ;
6666 }
6767
6868 const reportHandler = new ExcelReportProcessor ( ) ;
6969 let buffer : Buffer ;
7070
71- const ruleCategories = data . categories && data . categories . length > 0 ? data . categories : undefined ;
72-
73- const enabledRulesAndCategorys = await importAndCreateRuleInstances ( ruleCategories ) ;
7471 const customDiagnostic = new RapLPDiagnostic ( context ) ;
75- if ( data . report && Array . isArray ( data . report ) && data . report . length > 0 ) {
76- customDiagnostic . setFromPrecomputedReport ( data . report ) ;
77- } else {
78- customDiagnostic . processRuleExecutionInformation ( data . result , enabledRulesAndCategorys . rules , enabledRulesAndCategorys . instanceCategoryMap ) ;
79- }
72+ customDiagnostic . setFromPrecomputedReport ( data . report ) ;
8073 const diagnosticReports : DiagnosticReport [ ] = customDiagnostic . processDiagnosticInformation ( ) ;
8174
8275 try {
You can’t perform that action at this time.
0 commit comments