Skip to content

Commit

Permalink
refact : 코드 리뷰에 대한 코드 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeongdong committed Aug 4, 2024
1 parent 9a000de commit f7ebea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public PhotoResponse.PhotoDeleteInfo toPhotoDeleteInfo(List<Photo> photoList) {
.build();
}

public PhotoResponse.PhotoDownloadUrlListInfo toPhotoDownloadUrlListResponse(List<Photo> photoList) {
public PhotoResponse.PhotoDownloadUrlListInfo toPhotoDownloadUrlListInfo(List<Photo> photoList) {
List<String> photoDownloadUrlList = photoList.stream()
.map(Photo::getUrl)
.collect(Collectors.toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,27 @@
import com.amazonaws.HttpMethod;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.Headers;
import com.amazonaws.services.s3.model.AmazonS3Exception;
import com.amazonaws.services.s3.model.CannedAccessControlList;
import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest;
import com.amazonaws.services.s3.model.GetObjectRequest;
import com.amazonaws.services.s3.model.S3Object;
import com.amazonaws.services.s3.model.S3ObjectInputStream;
import com.amazonaws.util.IOUtils;
import com.umc.naoman.domain.member.entity.Member;
import com.umc.naoman.domain.photo.converter.PhotoConverter;
import com.umc.naoman.domain.photo.dto.PhotoRequest;
import com.umc.naoman.domain.photo.dto.PhotoResponse;
import com.umc.naoman.domain.photo.entity.Photo;
import com.umc.naoman.domain.photo.repository.PhotoRepository;
import com.umc.naoman.domain.shareGroup.entity.ShareGroup;
import com.umc.naoman.domain.shareGroup.repository.ProfileRepository;
import com.umc.naoman.domain.shareGroup.service.ShareGroupService;
import com.umc.naoman.global.error.BusinessException;
import io.awspring.cloud.s3.S3Template;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.net.URL;
import java.util.Date;
import java.util.List;
Expand All @@ -49,7 +41,7 @@ public class PhotoServiceImpl implements PhotoService {
private final PhotoRepository photoRepository;
private final ShareGroupService shareGroupService;
private final PhotoConverter photoConverter;
:

@Value("${spring.cloud.aws.s3.bucket}")
private String bucketName;

Expand Down Expand Up @@ -202,7 +194,7 @@ public PhotoResponse.PhotoDownloadUrlListInfo getPhotoDownloadUrlList(List<Long>
throw new BusinessException(PHOTO_NOT_FOUND);
}

return photoConverter.toPhotoDownloadUrlListResponse(photoList);
return photoConverter.toPhotoDownloadUrlListInfo(photoList);
}

private void validateShareGroupAndProfile(Long shareGroupId, Member member) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import lombok.Builder;
import lombok.Getter;
import org.springframework.http.HttpHeaders;

@Getter
@Builder
Expand Down

0 comments on commit f7ebea3

Please sign in to comment.