Changes check fixes

This commit is contained in:
Adina Țeudan 2021-11-18 17:47:22 +02:00
parent 1408f81f2b
commit 5b26f76f0e
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1,2 @@
export const CONFLICT_ERROR_CODE = 409;
export const CHANGED_CHECK_INTERVAL = 3000;

View File

@ -26,9 +26,8 @@ export abstract class GenericService<I> {
protected constructor(protected readonly _injector: Injector, protected readonly _defaultModelPath: string) {}
protected get _hasChanges$(): Observable<boolean> {
return this._post<{ value: boolean }>({ since: this._lastCheckedForChanges }, `${this._defaultModelPath}/changes`).pipe(
map(res => res.value),
tap(() => this._updateLastChanged()),
return this._post<{ value: boolean }>({ value: this._lastCheckedForChanges }, `${this._defaultModelPath}/changes`).pipe(
map((res: { value: boolean }) => res.value),
);
}