Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit 3bc6bd6

Browse files
committed
인증된 사용자만 비밀번호 초기화 가능
1 parent 7aaeeee commit 3bc6bd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/routes/AuthRouter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ restPost(router, '/password/reset/email/send')(async function(context, req) {
187187
throw new ApiError(400, ErrorCode.NO_EMAIL, "이메일을 입력해주세요.")
188188
}
189189

190-
let user = await UserService.getByEmail(email)
190+
let user = await UserService.getVerifiedByEmail(email)
191191

192192
if (!user) {
193-
throw new ApiError(404, ErrorCode.USER_NOT_FOUND, "해당 이메일로 가입된 사용자가 없습니다.");
193+
throw new ApiError(404, ErrorCode.USER_NOT_FOUND, "해당 이메일로 인증된 사용자가 없습니다.");
194194
}
195195

196196
await UserService.sendResetPasswordCode(user)

0 commit comments

Comments
 (0)