Refactor: image DataPath 수정

This commit is contained in:
김용수 2024-09-19 16:44:45 +09:00
parent 36cec776bd
commit 480a259968
3 changed files with 6 additions and 6 deletions

View File

@ -22,17 +22,17 @@ public class DetailImageResponse {
private String imageUrl;
@Schema(description = "폴리곤 데이터", example = "PENDING 상태라면 data null")
private String data;
private String dataPath;
@Schema(description = "이미지 상태", example = "PENDING")
private LabelStatus status;
public static DetailImageResponse from(final Image image, final String data) {
public static DetailImageResponse from(final Image image) {
return new DetailImageResponse(
image.getId(),
image.getTitle(),
image.getImagePath(),
data,
image.getDataPath(),
image.getStatus()
);
}

View File

@ -53,8 +53,8 @@ public class ImageService {
@Transactional(readOnly = true)
public DetailImageResponse getImageById(final Integer projectId, final Integer folderId, final Long imageId, final Integer memberId) {
Image image = getImageByIdAndFolderIdAndFolderProjectId(folderId, imageId, projectId); // 이미지가 해당 프로젝트에 속하는지 확인
String data = s3UploadService.getData(image.getDataPath());
return DetailImageResponse.from(image,data);
// String data = s3UploadService.getData(image.getDataPath());
return DetailImageResponse.from(image);
}
/**

View File

@ -25,7 +25,7 @@ public enum ErrorCode {
// Workspace - 3000
NOT_AUTHOR(HttpStatus.FORBIDDEN, 3001, "작성자가 아닙니다. 이 작업을 수행할 권한이 없습니다."),
WORKSPACE_NOT_FOUND(HttpStatus.BAD_REQUEST, 3002, "해당 워크스페이스는 존재하지 않습니다."),
EARLY_ADD_MEMBER(HttpStatus.BAD_REQUEST, 3003, "이미 추가된 멤버입니다."),
EARLY_ADD_MEMBER(HttpStatus.BAD_REQUEST, 3003,z "이미 추가된 멤버입니다."),
// Project - 4000
PROJECT_NOT_FOUND(HttpStatus.NOT_FOUND, 4000, "프로젝트를 찾을 수 없습니다"),