diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt index 3115000..6a6e191 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt @@ -17,12 +17,14 @@ import org.springframework.beans.factory.annotation.Value import org.springframework.data.domain.Pageable import org.springframework.data.repository.findByIdOrNull import org.springframework.stereotype.Service +import org.springframework.transaction.annotation.Transactional import org.springframework.web.multipart.MultipartFile import java.time.LocalDateTime import java.time.ZoneId import java.time.format.DateTimeFormatter @Service +@Transactional(readOnly = true) class LiveRoomService( private val repository: LiveRoomRepository, private val roomInfoRepository: LiveRoomInfoRedisRepository, @@ -90,6 +92,7 @@ class LiveRoomService( .toList() } + @Transactional fun createLiveRoom(coverImage: MultipartFile?, requestString: String, member: Member): CreateLiveRoomResponse { val request = objectMapper.readValue(requestString, CreateSudaRoomRequest::class.java) if (request.coverImageUrl == null && coverImage == null) {