Skip to content

Commit 34cad2a

Browse files
authored
Merge pull request #468 from Team-0ops/develop
Develop
2 parents 9e59182 + 25b2f15 commit 34cad2a

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎src/main/java/Oops/backend/domain/auth/controller/AuthController.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public ResponseEntity<BaseResponse> login(
139139
@ApiResponse(responseCode = "200", description = "비밀번호 변경 성공"),
140140
@ApiResponse(responseCode = "401", description = "인증 실패 (이메일 인증 실패 등)")})
141141
@PostMapping("/reset-password")
142-
public ResponseEntity<?> changePassword(@Valid @RequestBody ChangePasswordDto dto, @AuthenticatedUser(required = false) User user) {
143-
authService.changePassword(user, dto);
142+
public ResponseEntity<?> changePassword(@Valid @RequestBody ChangePasswordDto dto) {
143+
authService.changePassword(dto);
144144
return BaseResponse.onSuccess(SuccessStatus._OK, "비밀번호가 성공적으로 변경되었습니다.");
145145
}
146146

‎src/main/java/Oops/backend/domain/auth/service/AuthService.java‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ public LoginResponse login(LoginDto loginDto, HttpServletResponse response) {
6767
}
6868

6969
@Transactional
70-
public void changePassword(User user, ChangePasswordDto dto) {
71-
if(user != null)
72-
log.info(user.getUserName());
73-
70+
public void changePassword(ChangePasswordDto dto) {
7471
emailVerificationService.assertValidToken(dto.getEmail(), VerificationPurpose.PASSWORD_RESET, dto.getVerificationToken());
7572
User changePWUser = authRepository.findByEmail(dto.getEmail())
7673
.orElseThrow(() -> new GeneralException(ErrorStatus._NOT_FOUND, "해당 이메일의 사용자를 찾을 수 없습니다."));

0 commit comments

Comments
 (0)