diff --git a/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts b/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts index 6c86f8100..d187ed8d0 100644 --- a/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +++ b/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts @@ -1,14 +1,12 @@ import { Injectable } from '@angular/core' -import { combineLatest, Observable, of, switchMap, throwError } from 'rxjs' import { - combineLatest, - forkJoin, + catchError, + filter, + map, mergeMap, - Observable, - of, - switchMap, -} from 'rxjs' -import { catchError, filter, map, shareReplay, tap } from 'rxjs/operators' + shareReplay, + tap, +} from 'rxjs/operators' import { MeApiService, RecordsApiService, @@ -39,6 +37,14 @@ import { } from '@geonetwork-ui/api/metadata-converter' import { KeywordType } from '@geonetwork-ui/common/domain/model/thesaurus' import { noDuplicateFileName } from '@geonetwork-ui/util/shared' +import { + combineLatest, + forkJoin, + Observable, + of, + switchMap, + throwError, +} from 'rxjs' const minApiVersion = '4.2.2' @@ -341,7 +347,6 @@ export class Gn4PlatformService implements PlatformServiceInterface { ) } - attachFileToRecord(recordUuid: string, file: File) { attachFileToRecord(recordUuid: string, file: File): Observable { let sizeBytes = -1 diff --git a/libs/feature/editor/src/lib/+state/editor.effects.spec.ts b/libs/feature/editor/src/lib/+state/editor.effects.spec.ts index b021b49b2..deaf617dd 100644 --- a/libs/feature/editor/src/lib/+state/editor.effects.spec.ts +++ b/libs/feature/editor/src/lib/+state/editor.effects.spec.ts @@ -172,16 +172,6 @@ describe('EditorEffects', () => { }) }) - describe('cleanRecordAttachments$', () => { - it('dispatch markRecordAsChanged', () => { - actions = hot('-a-|', { - a: EditorActions.saveRecordSuccess(), - }) - const expected = hot('---|') - expect(effects.cleanRecordAttachments$).toBeObservable(expected) - }) - }) - describe('checkHasChangesOnOpen$', () => { describe('if the record has a draft', () => { it('dispatch markRecordAsChanged', () => {