Skip to content

Commit

Permalink
refactor: 코드 정렬 - #81
Browse files Browse the repository at this point in the history
  • Loading branch information
BonSeung committed Aug 6, 2024
1 parent 17a56df commit e359140
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public ResponseEntity<ResponseDto<UserInfoResponseDto>> getUserGrade(@Authentica
// 유저 정보 수정
@PatchMapping
public ResponseEntity<ResponseDto<Void>> 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);
}

// 유저 탈퇴
@DeleteMapping
public ResponseEntity<ResponseDto<Void>> 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private String getImagePath(String link) {
public List<String> uploadImage(List<MultipartFile> files) throws IOException {
List<String> 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("."));

Expand Down

0 comments on commit e359140

Please sign in to comment.