fix: restore old files

This commit is contained in:
MohamedAliBouhaouala 2025-04-25 11:12:35 +01:00
parent 68835bd306
commit 808f33b5a1
2 changed files with 8 additions and 10 deletions

View File

@ -200,16 +200,15 @@ export class BlockService extends BaseService<
// This ensures that only blocks with valid matches are kept, and blocks with no matches are excluded,
// all while iterating through the list only once.
const matchesWithPatterns = filteredBlocks.reduce<
NlpPatternMatchResult[]
>((acc, b) => {
const matchedPattern = this.matchNLP(nlp, b);
const matchesWithPatterns: NlpPatternMatchResult[] =
filteredBlocks.reduce<NlpPatternMatchResult[]>((acc, b) => {
const matchedPattern = this.matchNLP(nlp, b);
if (matchedPattern && matchedPattern.length > 0) {
acc.push({ block: b, matchedPattern });
}
return acc;
}, []);
if (matchedPattern && matchedPattern.length > 0) {
acc.push({ block: b, matchedPattern });
}
return acc;
}, []);
// Log the matched patterns
this.logger.debug(

View File

@ -31,7 +31,6 @@ import { NlpSampleService } from './services/nlp-sample.service';
import { NlpValueService } from './services/nlp-value.service';
import { NlpService } from './services/nlp.service';
// @Global()
@Module({
imports: [
MongooseModule.forFeature([