diff --git a/src/main/java/com/matdongsan/web/controller/account/ProfileController.java b/src/main/java/com/matdongsan/web/controller/account/ProfileController.java index 244601bc..325c3750 100644 --- a/src/main/java/com/matdongsan/web/controller/account/ProfileController.java +++ b/src/main/java/com/matdongsan/web/controller/account/ProfileController.java @@ -69,6 +69,7 @@ public String changeNickname(@ModelAttribute(value = "nickname") String nickname @PostMapping("/profile/change/password") public String changePassword(@Valid ProfilePasswordDto profilePasswordDto, BindingResult bindingResult, @AuthUser Account account, RedirectAttributes redirectAttributes) { if (bindingResult.hasErrors() || !accountService.checkAccountPassword(profilePasswordDto.getOriginalPassword(), account)) { + redirectAttributes.addFlashAttribute("profilePasswordDto", profilePasswordDto); redirectAttributes.addFlashAttribute("settingMessageError", "비밀번호를 확인해주세요."); return "redirect:/profile/setting"; } diff --git a/src/main/resources/templates/profile/profile-setting.html b/src/main/resources/templates/profile/profile-setting.html index da8b9dc5..97e494a4 100755 --- a/src/main/resources/templates/profile/profile-setting.html +++ b/src/main/resources/templates/profile/profile-setting.html @@ -16,7 +16,7 @@