Skip to content

Instantly share code, notes, and snippets.

@whisher
Created August 1, 2019 20:53
Show Gist options
  • Save whisher/a23f9ade669e57980dbd5b1cf1621c32 to your computer and use it in GitHub Desktop.
Save whisher/a23f9ade669e57980dbd5b1cf1621c32 to your computer and use it in GitHub Desktop.
postAccountUpdateProducts(
products: MarketAccountUpdateProductDto[]
): Observable<MarketAccountCompleteDto | null> {
return this.facade.data$.pipe(
switchMap((dto: MarketAccountCompleteDto | null) => {
if (dto) {
const data: MarketAccountUpdateProductsDto = {
user: dto.account,
products
};
return this.marketService.postAccountUpdateProducts(data);
}
return of(dto);
})
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment