From ca4e0900f33e365eb49e659107997a842c365c0c Mon Sep 17 00:00:00 2001 From: Amit Sengar Date: Thu, 12 May 2022 21:05:44 +0530 Subject: [PATCH 1/4] USR API read v5 #1 --- .../connection-hover-card/connection-hover.servive.ts | 2 +- .../routes/competencies/services/competence.service.ts | 4 ++-- .../connection-name/connection-hover.servive.ts | 2 +- .../routes/network-v2/services/network-v2.service.ts | 2 +- .../routes/profile-v2/services/profile-v2.servive.ts | 2 +- .../user-profile/services/user-profile.service.ts | 2 +- src/app/services/init.service.ts | 10 +++++++--- 7 files changed, 14 insertions(+), 10 deletions(-) diff --git a/library/ws-widget/collection/src/lib/_common/connection-hover-card/connection-hover.servive.ts b/library/ws-widget/collection/src/lib/_common/connection-hover-card/connection-hover.servive.ts index 3583154c0..6aaa741fb 100755 --- a/library/ws-widget/collection/src/lib/_common/connection-hover-card/connection-hover.servive.ts +++ b/library/ws-widget/collection/src/lib/_common/connection-hover-card/connection-hover.servive.ts @@ -10,7 +10,7 @@ import _ from 'lodash' const API_END_POINTS = { // getUserdetailsV2FromRegistry: '/apis/protected/v8/user/profileRegistry/getUserRegistryByUser', - getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v2/read', + getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v5/read', } @Injectable({ diff --git a/project/ws/app/src/lib/routes/competencies/services/competence.service.ts b/project/ws/app/src/lib/routes/competencies/services/competence.service.ts index da4d4757d..c4eabe704 100755 --- a/project/ws/app/src/lib/routes/competencies/services/competence.service.ts +++ b/project/ws/app/src/lib/routes/competencies/services/competence.service.ts @@ -11,10 +11,10 @@ const API_ENDPOINTS = { searchCompetency: 'apis/protected/v8/frac/searchNodes', filterByMappings: 'apis/protected/v8/frac/filterByMappings', // searchCompetency: '/apis/protected/v8/competency/searchCompetency', - fetchProfileNyId: (id: string) => `/apis/proxies/v8/api/user/v2/read/${id}`, + fetchProfileNyId: (id: string) => `/apis/proxies/v8/api/user/v5/read/${id}`, // fetchProfile: '/apis/protected/v8/user/profileDetails/getUserRegistry', fetchCompetencyDetails: (id: string, type: string) => `/apis/protected/v8/frac/getNodeById/${id}/${type}`, - fetchProfile: '/apis/proxies/v8/api/user/v2/read', + fetchProfile: '/apis/proxies/v8/api/user/v5/read', updateProfile: '/apis/protected/v8/user/profileDetails/updateUser', fetchWatCompetency: (id: string) => `/apis/protected/v8/workallocation/getUserCompetencies/${id}`, } diff --git a/project/ws/app/src/lib/routes/network-v2/components/connection-name/connection-hover.servive.ts b/project/ws/app/src/lib/routes/network-v2/components/connection-name/connection-hover.servive.ts index d1b1579c6..5c678f01c 100755 --- a/project/ws/app/src/lib/routes/network-v2/components/connection-name/connection-hover.servive.ts +++ b/project/ws/app/src/lib/routes/network-v2/components/connection-name/connection-hover.servive.ts @@ -10,7 +10,7 @@ import _ from 'lodash' const API_END_POINTS = { // getUserdetailsV2FromRegistry: '/apis/protected/v8/user/profileRegistry/getUserRegistryByUser', - getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v2/read', + getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v5/read', } @Injectable({ diff --git a/project/ws/app/src/lib/routes/network-v2/services/network-v2.service.ts b/project/ws/app/src/lib/routes/network-v2/services/network-v2.service.ts index 7188d9daf..f004e08a9 100755 --- a/project/ws/app/src/lib/routes/network-v2/services/network-v2.service.ts +++ b/project/ws/app/src/lib/routes/network-v2/services/network-v2.service.ts @@ -11,7 +11,7 @@ const API_ENDPOINTS = { connectionEstablished: `/apis/protected/v8/connections/v2/connections/established`, getSuggestedUsers: `/apis/protected/v8/connections/v2/connections/suggests`, // getUserdetailsV2FromRegistry: '/apis/protected/v8/user/profileRegistry/getUserRegistryByUser', - getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v2/read', + getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v5/read', } @Injectable({ diff --git a/project/ws/app/src/lib/routes/profile-v2/services/profile-v2.servive.ts b/project/ws/app/src/lib/routes/profile-v2/services/profile-v2.servive.ts index b039b5431..c2db62115 100755 --- a/project/ws/app/src/lib/routes/profile-v2/services/profile-v2.servive.ts +++ b/project/ws/app/src/lib/routes/profile-v2/services/profile-v2.servive.ts @@ -10,7 +10,7 @@ const API_END_POINTS = { PROFILE_DETAIL: `${PROTECTED_SLAG_V8}/social/post/timeline`, SOCIAL_VIEW_CONVERSATION: `${PROTECTED_SLAG_V8}/social/post/viewConversation`, // getUserdetailsV2FromRegistry: '/apis/protected/v8/user/profileRegistry/getUserRegistryByUser', - getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v2/read', + getUserdetailsV2FromRegistry: '/apis/proxies/v8/api/user/v5/read', } @Injectable({ diff --git a/project/ws/app/src/lib/routes/user-profile/services/user-profile.service.ts b/project/ws/app/src/lib/routes/user-profile/services/user-profile.service.ts index b9031be6b..92959b1da 100755 --- a/project/ws/app/src/lib/routes/user-profile/services/user-profile.service.ts +++ b/project/ws/app/src/lib/routes/user-profile/services/user-profile.service.ts @@ -12,7 +12,7 @@ import { map } from 'rxjs/operators' const API_ENDPOINTS = { updateProfileDetails: '/apis/protected/v8/user/profileDetails/updateUser', - getUserdetailsFromRegistry: '/apis/proxies/v8/api/user/v2/read', + getUserdetailsFromRegistry: '/apis/proxies/v8/api/user/v5/read', getUserdetails: '/apis/protected/v8/user/details/detailV1', getMasterNationlity: '/apis/protected/v8/user/profileRegistry/getMasterNationalities', getMasterLanguages: '/apis/protected/v8/user/profileRegistry/getMasterLanguages', diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index cd541c34f..ea5f97028 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -43,7 +43,7 @@ interface IFeaturePermissionConfigs { const PROXY_CREATE_V8 = '/apis/proxies/v8' const endpoint = { - profilePid: '/apis/proxies/v8/api/user/v2/read', + profilePid: '/apis/proxies/v8/api/user/v5/read', // profileV2: '/apis/protected/v8/user/profileRegistry/getUserRegistryById', // details: `/apis/protected/v8/user/details?ts=${Date.now()}`, CREATE_USER_API: `${PROXY_CREATE_V8}/discussion/user/v1/create`, @@ -259,8 +259,12 @@ export class InitService { try { userPidProfile = await this.http .get(endpoint.profilePid) - .pipe(map((res: any) => res.result.response)) - .toPromise() + .pipe(map((res: any) => { + debugger + let roles = _.map(_.get(res, 'result.response.roles'), 'role') + _.set(res, 'result.response.roles', roles) + return _.get(res, 'result.response') + })).toPromise() if (userPidProfile && userPidProfile.roles && userPidProfile.roles.length > 0 && this.hasRole(userPidProfile.roles)) { // if (userPidProfile.result.response.organisations.length > 0) { From a468d2441763058d9a537ae09e8a7f678b455a23 Mon Sep 17 00:00:00 2001 From: Amit Sengar Date: Thu, 12 May 2022 21:12:55 +0530 Subject: [PATCH 2/4] USR API read v5 #1 --- src/app/services/init.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index ea5f97028..a2dfb507b 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -260,7 +260,6 @@ export class InitService { userPidProfile = await this.http .get(endpoint.profilePid) .pipe(map((res: any) => { - debugger let roles = _.map(_.get(res, 'result.response.roles'), 'role') _.set(res, 'result.response.roles', roles) return _.get(res, 'result.response') From 0a8eb2f168b61ed51f4646aa559112803cddef5b Mon Sep 17 00:00:00 2001 From: Amit Sengar Date: Thu, 12 May 2022 21:19:40 +0530 Subject: [PATCH 3/4] USR API read v5 #2 --- src/app/services/init.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/init.service.ts b/src/app/services/init.service.ts index a2dfb507b..0751dfc72 100755 --- a/src/app/services/init.service.ts +++ b/src/app/services/init.service.ts @@ -260,7 +260,7 @@ export class InitService { userPidProfile = await this.http .get(endpoint.profilePid) .pipe(map((res: any) => { - let roles = _.map(_.get(res, 'result.response.roles'), 'role') + const roles = _.map(_.get(res, 'result.response.roles'), 'role') _.set(res, 'result.response.roles', roles) return _.get(res, 'result.response') })).toPromise() From 10a54f8138185b935da8168bf79468d1d896ce16 Mon Sep 17 00:00:00 2001 From: "christopher.fernandes" Date: Tue, 17 May 2022 12:33:36 +0530 Subject: [PATCH 4/4] Task #58378: Fixed the get rating during edit --- .../app-toc/components/app-toc-home/app-toc-home.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.ts b/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.ts index de39ec333..39e9e3afa 100755 --- a/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.ts +++ b/project/ws/app/src/lib/routes/app-toc/components/app-toc-home/app-toc-home.component.ts @@ -495,7 +495,7 @@ export class AppTocHomeComponent implements OnInit, OnDestroy, AfterViewChecked, if (this.content && this.content.identifier && this.content.primaryCategory) { this.ratingSvc.getRating(this.content.identifier, this.content.primaryCategory, this.userId).subscribe( (res: any) => { - this.userRating = res.result.response[0] + this.userRating = res.result.response this.tocSvc.changeUpdateReviews(true) // this.userRating = { // commentupdatedon: null,