We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2503775 commit a4720a5Copy full SHA for a4720a5
frontend/src/common/backend.ts
@@ -395,7 +395,14 @@ class UserService {
395
396
public async getUser(userId: string): Promise<UserDtoWithDetails> {
397
return axiosAuth.get<UserDtoWithDetails>(`/users/${userId}`)
398
- .then(response => AuthorityService.fillInMissingPicture(response.data))
+ .then(response => {
399
+ const user = response.data;
400
+ const filledUser = AuthorityService.fillInMissingPicture(user);
401
+ return {
402
+ ...filledUser,
403
+ groups: user.groups.map(g => AuthorityService.fillInMissingPicture({ ...g, type: 'GROUP' as const }))
404
+ };
405
+ })
406
.catch((error) => rethrowAndConvertIfExpected(error, 404));
407
}
408
0 commit comments