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();