From 92a5c8b9548a0e7644c42b6bfa5a830c1461a87c Mon Sep 17 00:00:00 2001 From: sohyundoh Date: Wed, 5 Jun 2024 10:56:55 +0900 Subject: [PATCH] =?UTF-8?q?#376=20[feat]=20=EB=AA=A8=EC=9E=84=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=B0=8F=20=EC=88=98=EC=A0=95=20default=20image=20?= =?UTF-8?q?url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/mile/moim/domain/Moim.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module-domain/src/main/java/com/mile/moim/domain/Moim.java b/module-domain/src/main/java/com/mile/moim/domain/Moim.java index dcf696d5..7f4779c2 100644 --- a/module-domain/src/main/java/com/mile/moim/domain/Moim.java +++ b/module-domain/src/main/java/com/mile/moim/domain/Moim.java @@ -38,7 +38,9 @@ public void modifyMoimInfo( final MoimInfoModifyRequest moimInfoModifyRequest ) { this.name = moimInfoModifyRequest.moimTitle(); - this.imageUrl = moimInfoModifyRequest.imageUrl(); + if (moimInfoModifyRequest.imageUrl() != null) { + this.imageUrl = moimInfoModifyRequest.imageUrl(); + } this.information = moimInfoModifyRequest.description(); this.isPublic = moimInfoModifyRequest.isPublic(); } @@ -59,9 +61,11 @@ private Moim( public static Moim create( final MoimCreateRequest moimCreateRequest ) { + String DEFAULT_IMG_URL = "https://mile-s3.s3.ap-northeast-2.amazonaws.com/test/groupMile.png"; + return Moim.builder() .name(moimCreateRequest.moimName()) - .imageUrl(moimCreateRequest.imageUrl()) + .imageUrl(moimCreateRequest.imageUrl() == null ? DEFAULT_IMG_URL : moimCreateRequest.imageUrl()) .information(moimCreateRequest.moimDescription()) .isPublic(moimCreateRequest.isPublic()) .build();