From ac4db73f1c7587c4e28f1777b921d0bd54624980 Mon Sep 17 00:00:00 2001
From: Albert <Albert.Bruns@mgm-tp.com>
Date: Wed, 26 Mar 2025 12:24:49 +0100
Subject: [PATCH] OZG-3563 after merge fix

---
 .../lib/aggregation-mapping-list-resource.service.ts   |  9 ++-------
 .../src/lib/resource/api-resource.service.ts           | 10 +++++-----
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/alfa-client/libs/admin/reporting-shared/src/lib/aggregation-mapping-list-resource.service.ts b/alfa-client/libs/admin/reporting-shared/src/lib/aggregation-mapping-list-resource.service.ts
index ab781c8a76..0520cc060c 100644
--- a/alfa-client/libs/admin/reporting-shared/src/lib/aggregation-mapping-list-resource.service.ts
+++ b/alfa-client/libs/admin/reporting-shared/src/lib/aggregation-mapping-list-resource.service.ts
@@ -1,14 +1,9 @@
 import { ConfigurationLinkRel, ConfigurationResource, ConfigurationService } from '@admin-client/configuration-shared';
-import {
-  ApiListResourceService,
-  ListResourceServiceConfig,
-  ResourceListService,
-  ResourceRepository,
-} from '@alfa-client/tech-shared';
+import { ApiListResourceService, ListResourceServiceConfig, ResourceRepository } from '@alfa-client/tech-shared';
 import { AggregationMappingListLinkRel } from './aggregation-mapping.linkrel';
 import { AggregationMappingListResource, AggregationMappingResource } from './aggregation-mapping.model';
 
-export class AggregationMappingListResourceService extends ResourceListService<
+export class AggregationMappingListResourceService extends ApiListResourceService<
   ConfigurationResource,
   AggregationMappingListResource,
   AggregationMappingResource
diff --git a/alfa-client/libs/tech-shared/src/lib/resource/api-resource.service.ts b/alfa-client/libs/tech-shared/src/lib/resource/api-resource.service.ts
index d7e4c30839..bb0eed1b7e 100644
--- a/alfa-client/libs/tech-shared/src/lib/resource/api-resource.service.ts
+++ b/alfa-client/libs/tech-shared/src/lib/resource/api-resource.service.ts
@@ -41,7 +41,7 @@ export class ApiResourceService<B extends Resource, T extends Resource> extends
     super(config, stateService);
   }
 
-  public save(toSave: unknown): Observable<StateResource<T | HttpError>> {
+  public save(toSave: unknown): Observable<StateResource<T>> {
     return this.selectResource().pipe(
       switchMap((stateResource: StateResource<T>) =>
         this.doSave(stateResource.resource, toSave).pipe(
@@ -50,7 +50,7 @@ export class ApiResourceService<B extends Resource, T extends Resource> extends
           catchError((errorResponse: HttpErrorResponse) => this.handleError(errorResponse)),
         ),
       ),
-      startWith(createEmptyStateResource<T | HttpError>(true)),
+      startWith(createEmptyStateResource<T>(true)),
     );
   }
 
@@ -62,7 +62,7 @@ export class ApiResourceService<B extends Resource, T extends Resource> extends
     });
   }
 
-  public patch(toPatch: unknown): Observable<StateResource<T | HttpError>> {
+  public patch(toPatch: unknown): Observable<StateResource<T>> {
     return this.selectResource().pipe(
       switchMap((stateResource: StateResource<T>) =>
         this.doPatch(stateResource.resource, toPatch).pipe(
@@ -71,7 +71,7 @@ export class ApiResourceService<B extends Resource, T extends Resource> extends
           catchError((errorResponse: HttpErrorResponse) => this.handleError(errorResponse)),
         ),
       ),
-      startWith(createEmptyStateResource<T | HttpError>(true)),
+      startWith(createEmptyStateResource<T>(true)),
     );
   }
 
@@ -83,7 +83,7 @@ export class ApiResourceService<B extends Resource, T extends Resource> extends
     });
   }
 
-  handleError(errorResponse: HttpErrorResponse): Observable<StateResource<HttpError>> {
+  handleError(errorResponse: HttpErrorResponse): Observable<StateResource<T>> {
     if (isUnprocessableEntity(errorResponse.status)) {
       return of(createErrorStateResource((<any>errorResponse) as HttpError));
     }
-- 
GitLab