Skip to content

Commit

Permalink
#376 [feat] 모임 생성 및 수정 default image url 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
sohyundoh committed Jun 5, 2024
1 parent 6438c41 commit 92a5c8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions module-domain/src/main/java/com/mile/moim/domain/Moim.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();
Expand Down

0 comments on commit 92a5c8b

Please sign in to comment.