1
0

Merge branch 'main' into Removing-unnecessary-circular-dependencies

This commit is contained in:
lotte
2022-04-20 14:47:55 +02:00
280 changed files with 7366 additions and 8121 deletions

View File

@@ -1,6 +1,6 @@
import { Injectable, Injector } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { catchError, filter, map, mergeMap, take } from 'rxjs/operators';
import { hasValue, isNotEmpty } from '../../shared/empty.util';
@@ -25,7 +25,7 @@ import { RequestEntry } from './request-entry.model';
@Injectable()
export class RequestEffects {
@Effect() execute = this.actions$.pipe(
execute = createEffect(() => this.actions$.pipe(
ofType(RequestActionTypes.EXECUTE),
mergeMap((action: RequestExecuteAction) => {
return this.requestService.getByUUID(action.payload).pipe(
@@ -54,7 +54,7 @@ export class RequestEffects {
})
);
})
);
));
/**
* When the store is rehydrated in the browser, set all cache
@@ -64,10 +64,10 @@ export class RequestEffects {
* This assumes that the server cached everything a negligible
* time ago, and will likely need to be revisited later
*/
@Effect() fixTimestampsOnRehydrate = this.actions$
fixTimestampsOnRehydrate = createEffect(() => this.actions$
.pipe(ofType(StoreActionTypes.REHYDRATE),
map(() => new ResetResponseTimestampsAction(new Date().getTime()))
);
));
constructor(
private actions$: Actions,