From 4e8e744fc57eee803e3958b8673d041d35ae26c6 Mon Sep 17 00:00:00 2001 From: taguesokoudjou Date: Wed, 15 Jul 2026 14:25:53 +0200 Subject: [PATCH] fix(webapp): use KeywordsService for patent keyword search after dev merge --- .../patents-results/patents-results.component.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/webapp/src/app/modules/keywords-search/search-results/patents-results/patents-results.component.ts b/webapp/src/app/modules/keywords-search/search-results/patents-results/patents-results.component.ts index 9e7844af..aad267f5 100644 --- a/webapp/src/app/modules/keywords-search/search-results/patents-results/patents-results.component.ts +++ b/webapp/src/app/modules/keywords-search/search-results/patents-results/patents-results.component.ts @@ -4,8 +4,9 @@ import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; import { MatIconModule } from '@angular/material/icon'; -import { PatentsService } from '../../../../api/api/patents.service'; +import { KeywordsService } from '../../../../api/api/keywords.service'; import { KeywordPatentMatch } from '../../../../api/model/keywordPatentMatch'; +import { PatentsByKeywordsResponse } from '../../../../api/model/patentsByKeywordsResponse'; import { WeightMap, WeightSliderOption, @@ -39,7 +40,7 @@ import { SearchResultsStateService } from '../search-results-state.service'; }) export class KeywordsToPatentsResultsComponent implements OnInit { protected readonly state = inject(SearchResultsStateService); - private readonly patentsService = inject(PatentsService); + private readonly keywordsService = inject(KeywordsService); readonly defaultWeights: WeightMap = { ...DEFAULT_PATENT_SCORE_WEIGHTS }; @@ -125,12 +126,12 @@ export class KeywordsToPatentsResultsComponent implements OnInit { this.loadingPatents.set(true); this.patentsError.set(false); - this.patentsService.getPatentsByKeywords({ keywords }).subscribe({ - next: (response) => { + this.keywordsService.getPatentsByKeywords({ keywords }).subscribe({ + next: (response: PatentsByKeywordsResponse) => { this.setPatentMatches(response.patents ?? []); this.loadingPatents.set(false); }, - error: (error) => { + error: (error: unknown) => { console.error('Patent search failed:', error); this.setPatentMatches([]); this.patentsError.set(true);