From 7d3e1e112480501b3c57c7473ae4b6429d923f22 Mon Sep 17 00:00:00 2001 From: Florent Gravin Date: Mon, 11 Dec 2023 10:44:29 +0100 Subject: [PATCH] fix(sources): use back /sources request as /sourceS/harvester is not compatible in 4.2.2 --- libs/feature/catalog/src/lib/sources/sources.service.spec.ts | 2 +- libs/feature/catalog/src/lib/sources/sources.service.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libs/feature/catalog/src/lib/sources/sources.service.spec.ts b/libs/feature/catalog/src/lib/sources/sources.service.spec.ts index a71da69906..287defed53 100644 --- a/libs/feature/catalog/src/lib/sources/sources.service.spec.ts +++ b/libs/feature/catalog/src/lib/sources/sources.service.spec.ts @@ -8,7 +8,7 @@ import { Observable } from 'rxjs' import { LangService } from '@geonetwork-ui/util/i18n' class SourcesApiServiceMock { - getSourcesByType = jest.fn(function () { + getSubPortals1 = jest.fn(function () { return new Observable((observer) => { observer.next(SOURCES_FIXTURE) }) diff --git a/libs/feature/catalog/src/lib/sources/sources.service.ts b/libs/feature/catalog/src/lib/sources/sources.service.ts index 0bffe71fa8..490423e514 100644 --- a/libs/feature/catalog/src/lib/sources/sources.service.ts +++ b/libs/feature/catalog/src/lib/sources/sources.service.ts @@ -10,9 +10,7 @@ import { CatalogSource } from './sources.model' }) export class SourcesService { sources$: Observable = ( - this.sourcesApiService.getSourcesByType('harvester') as Observable< - CatalogSource[] - > + this.sourcesApiService.getSubPortals1() as Observable ).pipe(shareReplay()) constructor(