diff --git a/backend/src/users/user-info.dto.ts b/backend/src/users/user-info.dto.ts index af4b057bc..02483498a 100644 --- a/backend/src/users/user-info.dto.ts +++ b/backend/src/users/user-info.dto.ts @@ -37,7 +37,7 @@ export class UserInfoDto extends BaseDto { format: 'uri', }) @IsString() - photo: string; + photoUrl: string; } /** diff --git a/backend/src/users/users.service.spec.ts b/backend/src/users/users.service.spec.ts index d32da35cc..005d92bfd 100644 --- a/backend/src/users/users.service.spec.ts +++ b/backend/src/users/users.service.spec.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + * SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file) * * SPDX-License-Identifier: AGPL-3.0-only */ @@ -147,7 +147,7 @@ describe('UsersService', () => { const userDto = service.toUserDto(user); expect(userDto.username).toEqual(username); expect(userDto.displayName).toEqual(displayname); - expect(userDto.photo).toEqual(''); + expect(userDto.photoUrl).toEqual(''); }); }); @@ -159,7 +159,7 @@ describe('UsersService', () => { const userDto = service.toFullUserDto(user); expect(userDto.username).toEqual(username); expect(userDto.displayName).toEqual(displayname); - expect(userDto.photo).toEqual(''); + expect(userDto.photoUrl).toEqual(''); expect(userDto.email).toEqual(''); }); }); diff --git a/backend/src/users/users.service.ts b/backend/src/users/users.service.ts index 2712d3102..e031c23fb 100644 --- a/backend/src/users/users.service.ts +++ b/backend/src/users/users.service.ts @@ -119,7 +119,7 @@ export class UsersService { return { username: user.username, displayName: user.displayName, - photo: this.getPhotoUrl(user), + photoUrl: this.getPhotoUrl(user), }; } @@ -132,7 +132,7 @@ export class UsersService { return { username: user.username, displayName: user.displayName, - photo: this.getPhotoUrl(user), + photoUrl: this.getPhotoUrl(user), email: user.email ?? '', }; }