Skip to content

Commit

Permalink
Merge pull request #347 from wafflestudio/develop
Browse files Browse the repository at this point in the history
인증된 사용자만 비밀번호 초기화 가능
  • Loading branch information
Hank-Choi authored Oct 30, 2024
2 parents c3600f1 + 3bc6bd6 commit d33a81a
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 d33a81a

Please sign in to comment.