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/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, 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..0751dfc72 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,11 @@ export class InitService { try { userPidProfile = await this.http .get(endpoint.profilePid) - .pipe(map((res: any) => res.result.response)) - .toPromise() + .pipe(map((res: any) => { + const 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) {