From ffd70c9e5a7fbf4b004b1f9def9cd26d8e6e014c Mon Sep 17 00:00:00 2001 From: yaongmeow Date: Wed, 13 Dec 2023 14:33:41 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=EB=8F=84=20=EA=B0=99=EC=9D=B4=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BE/src/users/dto/user-info.dto.ts | 4 ++++ BE/src/users/users.service.ts | 4 ++-- BE/src/users/users.swagger.ts | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BE/src/users/dto/user-info.dto.ts b/BE/src/users/dto/user-info.dto.ts index 563d47f..242aa03 100644 --- a/BE/src/users/dto/user-info.dto.ts +++ b/BE/src/users/dto/user-info.dto.ts @@ -11,4 +11,8 @@ export class UserInfoDto { @IsString() @ApiProperty({ nullable: true }) avatar: string; + + @IsString() + @ApiProperty({ nullable: true }) + avatarPath: string; } diff --git a/BE/src/users/users.service.ts b/BE/src/users/users.service.ts index 179e06d..c6fc479 100644 --- a/BE/src/users/users.service.ts +++ b/BE/src/users/users.service.ts @@ -56,13 +56,13 @@ export class UsersService { return this.userRepository.findById(id); } - async getUserInfoById(id: string): Promise { + async getUserInfoById(id: string) { const user = await this.userRepository.findById(id); const avatarPath = user.avatar; if (user.avatar !== null) { user.avatar = await this.storageService.getImageUrl(avatarPath); } - return { name: user.name, avatar: user.avatar }; + return { name: user.name, avatar: user.avatar, avatarPath }; } async getUserInfoByResourceId(resourceId: string) { diff --git a/BE/src/users/users.swagger.ts b/BE/src/users/users.swagger.ts index 7f61317..9a14523 100644 --- a/BE/src/users/users.swagger.ts +++ b/BE/src/users/users.swagger.ts @@ -2,6 +2,7 @@ export const Users = { name: '레몬', avatar: 'https://traveline.kr.object.ncloudstorage.com/123456789012345678901234567890123456/bd67709e-0a62-4cb2-acb5-a26d539f90e5.jpg?AWSAccessKeyId=qjvpzL57YZV54DgXNdvd&Expires=1701542436&Signature=PLHDtpwQVMT0SeM5hsGWl%2F7JV2w%3D', + avatarPath: '123456789012345678901234567890123456/lemon.jpg', }; export const getUsersDuplicate = {