mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
fix: id cards are wiped/replaced when an error happens in the pipe
This commit is contained in:
@@ -41,7 +41,7 @@ export class IdCardsProvider {
|
|||||||
mergeMap(user => this.fetchFallbackIdCards(user)),
|
mergeMap(user => this.fetchFallbackIdCards(user)),
|
||||||
startWith([]),
|
startWith([]),
|
||||||
)
|
)
|
||||||
: of([]).pipe(tap(() => this.encryptedStorageProvider.delete('id-cards'))),
|
: of([]).pipe(tap({next: () => this.encryptedStorageProvider.delete('id-cards')})),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ export class IdCardsProvider {
|
|||||||
},
|
},
|
||||||
responseType: 'json',
|
responseType: 'json',
|
||||||
})
|
})
|
||||||
.pipe(tap(idCards => this.encryptedStorageProvider.set('id-cards', idCards)));
|
.pipe(tap({next: idCards => this.encryptedStorageProvider.set('id-cards', idCards)}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private fetchFallbackIdCards(user: SCUserConfiguration): Observable<SCIdCard[]> {
|
private fetchFallbackIdCards(user: SCUserConfiguration): Observable<SCIdCard[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user