Skip to content
Snippets Groups Projects
Commit dadf1ef4 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5012 remove missplaced verification; remove dev logs

parent 931376b3
No related branches found
No related tags found
No related merge requests found
......@@ -54,9 +54,6 @@ export class ApiRootService {
filter((apiRootStateResource: StateResource<ApiRootResource>) =>
this.shouldEmit(apiRootStateResource),
),
tap((apiRootStateResource: StateResource<ApiRootResource>) => {
if (isDevMode()) console.debug('APIROOT SERVICE - GET - EMIT: ', apiRootStateResource);
}),
startWith(createEmptyStateResource<ApiRootResource>(true)),
);
}
......
......@@ -16,9 +16,9 @@ import { singleCold, singleHot } from './marbles';
import { HttpErrorResponse } from '@angular/common/http';
import { createProblemDetail } from 'libs/tech-shared/test/error';
import { HttpError, ProblemDetail } from '../tech.model';
import { cold } from 'jest-marbles';
import * as ResourceUtil from './resource.util';
import { cold } from 'jest-marbles';
describe('ResourceService', () => {
let service: ResourceService<Resource, Resource>;
......@@ -475,14 +475,6 @@ describe('ResourceService', () => {
service.loadResource = jest.fn();
});
it('should throw error if stateresource is empty', () => {
service.stateResource.next(createEmptyStateResource());
expect(() => service.refresh()).toThrowError(
'No stateresource exists which can be refreshed.',
);
});
it('should set reload true on statresource', () => {
service.stateResource.next(createStateResource(createDummyResource()));
......
......@@ -54,9 +54,6 @@ export class ResourceService<B extends Resource, T extends Resource> {
),
filter(([stateResource]) => !this.shouldFilter(stateResource)),
map(([stateResource]) => stateResource),
tap((stateResource: StateResource<T>) => {
if (isDevMode()) console.debug('RESOURCE SERVICE - GET - EMIT:', stateResource);
}),
startWith(createEmptyStateResource<T>(true)),
);
}
......@@ -174,17 +171,9 @@ export class ResourceService<B extends Resource, T extends Resource> {
}
public refresh(): void {
this.verifyStateResource();
this.stateResource.next({ ...this.stateResource.value, reload: true });
}
private verifyStateResource(): void {
throwErrorOn(
isNull(this.getStateResource()),
'No stateresource exists which can be refreshed.',
);
}
public canEdit(): boolean {
return this.hasLinkRel(this.config.editLinkRel);
}
......
......@@ -72,9 +72,6 @@ export class VorgangService {
);
}),
map(([vorgangWithEingang]) => vorgangWithEingang),
tap((vorgangWithEingang: StateResource<VorgangWithEingangResource>) => {
if (isDevMode()) console.debug('VORGANG SERVICE - GET - EMIT: ', vorgangWithEingang);
}),
startWith(createEmptyStateResource<VorgangWithEingangResource>(true)),
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment