Skip to content
Snippets Groups Projects
Commit ac4db73f authored by Albert Bruns's avatar Albert Bruns
Browse files

OZG-3563 after merge fix

parent 0a55c467
Branches
Tags
1 merge request!129OZG-3563-anbindung-resourceservice-kommentar-shared
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
......
......@@ -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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment