Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async loadUserProfile() {
const groupsApi = new GroupsApi(this.alfrescoApiService.getInstance());
const paging = await groupsApi.listGroupMembershipsForPerson('-me-');
const groups: Group[] = [];
if (paging && paging.list && paging.list.entries) {
groups.push(...paging.list.entries.map(obj => obj.entry));
}
this.contentApi.getPerson('-me-').subscribe(person => {
this.store.dispatch(
new SetUserProfileAction({ person: person.entry, groups })
);
});
}