From 9e9779e05e21304f97f65ddc3935cf21adf57f63 Mon Sep 17 00:00:00 2001 From: Art Date: Sun, 10 Oct 2021 11:45:03 +0300 Subject: [PATCH] 31.11. User Resolver - refactored pipe (#31) --- support-portal-frontend/src/app/service/user.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/support-portal-frontend/src/app/service/user.service.ts b/support-portal-frontend/src/app/service/user.service.ts index 22e5968..474a793 100644 --- a/support-portal-frontend/src/app/service/user.service.ts +++ b/support-portal-frontend/src/app/service/user.service.ts @@ -97,8 +97,10 @@ export class UserService { if (foundUser) return foundUser; return this.getAllUsers() - .pipe(map((page: UserPage, idx: number) => page.content)) - .pipe(map(users => users.find(u => u.userId === id)!)); + .pipe( + map((page: UserPage, idx: number) => page.content), + map(users => users.find(u => u.userId === id)!) + ); } }