diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt index 50e6d98..0859688 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/controller/dto/BoardCreateRequest.kt @@ -13,5 +13,5 @@ data class BoardCreateRequest( @field:Schema(description = "작성자 아이디", example = "null", required = false) var userId: Long? = null, @field:Schema(description = "보드 옵션 - key 값으로 THEMA를 주세요. value로는 프론트에서 지정한 숫자 혹은 식별값을 주세요.", example = "{\"THEMA\":\"value3\"}") - val options : Map + val options : Map? ) diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt index 81b9d6c..7ec3a6c 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt @@ -36,7 +36,7 @@ class BoardJooqRepositoryImpl( this.yn = 1 this.activeyn = 1 this.userId = request.userId - this.options = request.options.let { ObjectMapper().writeValueAsString(it) } + this.options = request.options?.let { ObjectMapper().writeValueAsString(it) } } val result = this.dslContext.insertInto(jBoard) .set(insertValue)