From 44b0870c2881514ec26d996b6616b55fa47f5fb8 Mon Sep 17 00:00:00 2001 From: Chun Hyunwoo <1000chw@gmail.com> Date: Fri, 5 Jan 2024 16:01:28 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=B0=BE=EA=B8=B0=20Swagger=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/user/dto/finding-password-request.dto.ts | 1 + src/user/user.controller.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/user/dto/finding-password-request.dto.ts b/src/user/dto/finding-password-request.dto.ts index e17cb36..fa47867 100644 --- a/src/user/dto/finding-password-request.dto.ts +++ b/src/user/dto/finding-password-request.dto.ts @@ -6,5 +6,6 @@ export class FindingPasswordRequest { @IsEmail({}, { message: '이메일 형식이 아닙니다' }) @IsNotEmpty({ message: '이메일은 필수입니다.' }) @IsEmailExist({ message: '존재하지 않는 유저입니다.' }) + @ApiProperty({ description: '이메일', example: 'example@example.com' }) readonly email: string; } diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts index 9f99205..bbf17bb 100644 --- a/src/user/user.controller.ts +++ b/src/user/user.controller.ts @@ -5,6 +5,7 @@ import { ApiConsumes, ApiCreatedResponse, ApiExtraModels, + ApiOkResponse, ApiOperation, ApiTags, getSchemaPath, @@ -60,6 +61,11 @@ export class UserController { } @Post('finding-password') + @ApiOperation({ + summary: '이메일로 비밀번호 찾기', + description: '이메일로 비밀번호 임시 비밀번호를 보냅니다.', + }) + @ApiOkResponse({ type: FindingPasswordResponse, description: '임시 비밀번호 전송 완료' }) async findPassword( @Body() request: FindingPasswordRequest, ): Promise> {