커뮤니티 게시글 유료화 #182

Merged
klaus merged 7 commits from test into main 2024-05-24 14:44:15 +00:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit 685a3998a2 - Show all commits

View File

@ -47,6 +47,10 @@ class CreatorCommunityService(
fun createCommunityPost(postImage: MultipartFile?, requestString: String, member: Member) {
val request = objectMapper.readValue(requestString, CreateCommunityPostRequest::class.java)
if (request.price > 0 && postImage != null) {
throw SodaException("유료 게시글 등록을 위해서는 이미지가 필요합니다.")
}
val post = CreatorCommunity(
content = request.content,
price = request.price,