From 024b8ce872ae0bb087fda345ee3a8fa38aca8161 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 21 Dec 2023 00:22:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20=EC=88=98=EC=A0=95=20API=20-=20is?= =?UTF-8?q?Active=20=EC=88=98=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../explorer/profile/creatorCommunity/CreatorCommunity.kt | 2 +- .../profile/creatorCommunity/CreatorCommunityService.kt | 4 ++++ .../profile/creatorCommunity/ModifyCommunityPostRequest.kt | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt index 70be7d0..7dea288 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt @@ -16,7 +16,7 @@ data class CreatorCommunity( var isAdult: Boolean, @Column(nullable = true) var imagePath: String? = null, - val isActive: Boolean = true + var isActive: Boolean = true ) : BaseEntity() { @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "member_id", nullable = false) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt index 2916c97..9c71bab 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt @@ -100,6 +100,10 @@ class CreatorCommunityService( post.isAdult = request.isAdult } + if (request.isActive != null) { + post.isActive = request.isActive + } + if (postImage != null) { val metadata = ObjectMetadata() metadata.contentLength = postImage.size diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/ModifyCommunityPostRequest.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/ModifyCommunityPostRequest.kt index 58ae72a..d887db4 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/ModifyCommunityPostRequest.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/ModifyCommunityPostRequest.kt @@ -4,5 +4,6 @@ data class ModifyCommunityPostRequest( val creatorCommunityId: Long, val content: String?, val isCommentAvailable: Boolean?, - val isAdult: Boolean? + val isAdult: Boolean?, + val isActive: Boolean? )