Skip to content

Commit 4b0244b

Browse files
committed
Fix: 사진 신고에도 닉네임 추가
1 parent f68214e commit 4b0244b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/DecodEat/domain/report/converter/ReportConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ public static NutritionReport toNutritionReport(Long reporterId, String nickname
4343
.build();
4444
}
4545

46-
public static ImageReport toImageReport(Long reporterId, Product product, String imageUrl){
46+
public static ImageReport toImageReport(Long reporterId, String nickname, Product product, String imageUrl){
4747
return ImageReport.builder()
4848
.product(product)
4949
.reporterId(reporterId)
50+
.nickname(nickname)
5051
.reportStatus(ReportStatus.IN_PROGRESS)
5152
.imageUrl(imageUrl)
5253
.build();

src/main/java/com/DecodEat/domain/report/service/ReportService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public ReportResponseDto requestCheckImage(User user, Long productId, String ima
4747

4848
Product productProxy = productRepository.getReferenceById(productId); //SELECT 쿼리 없이 ID만 가진 프록시 객체를 가져옴
4949

50-
imageReportRepository.save(ReportConverter.toImageReport(user.getId(), productProxy, imageUrl));
50+
imageReportRepository.save(ReportConverter.toImageReport(user.getId(), user.getNickname(), productProxy, imageUrl));
5151

5252
return ReportConverter.toReportResponseDto(productId,"상품 사진 확인 요청 완료");
5353
}

0 commit comments

Comments
 (0)