From e359140d3f4f110e5437da890769bd8666220bb4 Mon Sep 17 00:00:00 2001 From: BonSeung Date: Tue, 6 Aug 2024 10:17:55 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=BD=94=EB=93=9C=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=20-=20#81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/mutsideout_mju/controller/UserController.java | 4 ++-- .../com/example/mutsideout_mju/service/PlannerService.java | 2 +- .../java/com/example/mutsideout_mju/service/UserService.java | 2 +- src/main/java/com/example/mutsideout_mju/util/S3Service.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/example/mutsideout_mju/controller/UserController.java b/src/main/java/com/example/mutsideout_mju/controller/UserController.java index 44e4ce8..1085ba1 100644 --- a/src/main/java/com/example/mutsideout_mju/controller/UserController.java +++ b/src/main/java/com/example/mutsideout_mju/controller/UserController.java @@ -29,7 +29,7 @@ public ResponseEntity> getUserGrade(@Authentica // 유저 정보 수정 @PatchMapping public ResponseEntity> updateUser(@AuthenticatedUser User user, - @RequestBody @Valid UpdateUserDto updateUserDto) { + @RequestBody @Valid UpdateUserDto updateUserDto) { userService.updateUser(user, updateUserDto); return new ResponseEntity<>(ResponseDto.res(HttpStatus.OK, "유저 정보 수정 완료"), HttpStatus.OK); } @@ -37,7 +37,7 @@ public ResponseEntity> updateUser(@AuthenticatedUser User user // 유저 탈퇴 @DeleteMapping public ResponseEntity> deleteUser(@AuthenticatedUser User user, - @RequestBody @Valid DeleteUserDto deleteUserDto) { + @RequestBody @Valid DeleteUserDto deleteUserDto) { userService.deleteUser(user, deleteUserDto); return new ResponseEntity<>(ResponseDto.res(HttpStatus.OK, "회원 탈퇴 성공"), HttpStatus.OK); } diff --git a/src/main/java/com/example/mutsideout_mju/service/PlannerService.java b/src/main/java/com/example/mutsideout_mju/service/PlannerService.java index 896e205..dd729c1 100644 --- a/src/main/java/com/example/mutsideout_mju/service/PlannerService.java +++ b/src/main/java/com/example/mutsideout_mju/service/PlannerService.java @@ -137,7 +137,7 @@ public DailyPlannerCompletionDataList getMonthlyPlannerStats(User user, String m */ public void deletePlanner(User user, UUID plannerId) { Planner planner = findPlanner(user.getId(), plannerId); - if(planner.isCompleted()){ + if (planner.isCompleted()) { throw new ForbiddenException(ErrorCode.INVALID_PLANNER_ACCESS, "완료된 플랜은 삭제할 수 없습니다."); } plannerRepository.delete(planner); diff --git a/src/main/java/com/example/mutsideout_mju/service/UserService.java b/src/main/java/com/example/mutsideout_mju/service/UserService.java index 8ed05ac..0ed957c 100644 --- a/src/main/java/com/example/mutsideout_mju/service/UserService.java +++ b/src/main/java/com/example/mutsideout_mju/service/UserService.java @@ -73,7 +73,7 @@ public void updateUser(User user, UpdateUserDto updateUserDto) { /** * 유저 전체 정보(이메일, 이름, 등급) 조회 */ - public UserInfoResponseDto getMyPage(User user){ + public UserInfoResponseDto getMyPage(User user) { UserInfoResponseDto userInfoResponseDto = UserInfoResponseDto.of(user.getEmail(), user.getName(), user.getUserGrade()); return userInfoResponseDto; } diff --git a/src/main/java/com/example/mutsideout_mju/util/S3Service.java b/src/main/java/com/example/mutsideout_mju/util/S3Service.java index df496a7..2100aea 100644 --- a/src/main/java/com/example/mutsideout_mju/util/S3Service.java +++ b/src/main/java/com/example/mutsideout_mju/util/S3Service.java @@ -51,7 +51,7 @@ private String getImagePath(String link) { public List uploadImage(List files) throws IOException { List imageUrls = new ArrayList<>(); - for(MultipartFile file : files){ + for (MultipartFile file : files) { String dateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmm")); String extension = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));