Skip to content

Commit

Permalink
인증된 사용자만 비밀번호 초기화 가능
Browse files Browse the repository at this point in the history
  • Loading branch information
Hank-Choi committed Oct 30, 2024
1 parent 7aaeeee commit 3bc6bd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/routes/AuthRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ restPost(router, '/password/reset/email/send')(async function(context, req) {
throw new ApiError(400, ErrorCode.NO_EMAIL, "이메일을 입력해주세요.")
}

let user = await UserService.getByEmail(email)
let user = await UserService.getVerifiedByEmail(email)

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

await UserService.sendResetPasswordCode(user)
Expand Down

0 comments on commit 3bc6bd6

Please sign in to comment.