From 95717824c64a76405a0977b67e7786d90f292ebc Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 22 Feb 2024 16:03:37 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A3=B0=EB=A0=9B=20=ED=94=84=EB=A6=AC?= =?UTF-8?q?=EC=85=8B=20API=20=EC=B6=94=EA=B0=80=20-=20=EB=A3=B0=EB=A0=9B?= =?UTF-8?q?=20=EB=A7=8C=EB=93=A4=EA=B8=B0=20-=20=EB=A3=B0=EB=A0=9B=20?= =?UTF-8?q?=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20-=20=EB=A3=B0=EB=A0=9B?= =?UTF-8?q?=20=ED=94=84=EB=A6=AC=EC=85=8B=20=EC=A0=84=EC=B2=B4=20=EA=B0=80?= =?UTF-8?q?=EC=A0=B8=EC=98=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vividnext/sodalive/live/roulette/NewRouletteService.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/roulette/NewRouletteService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/roulette/NewRouletteService.kt index 4288f3f..3b09e17 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/roulette/NewRouletteService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/roulette/NewRouletteService.kt @@ -36,11 +36,11 @@ class NewRouletteService( fun getAllRoulette(creatorId: Long, memberId: Long): List { if (creatorId != memberId) throw SodaException("잘못된 요청입니다.") - val rouletteList = repository.findByCreatorId(creatorId) + var rouletteList = repository.findByCreatorId(creatorId) if (rouletteList.isEmpty()) { val roulette = oldRepository.findByIdOrNull(creatorId) if (roulette != null) { - val newRoulette = repository.save( + repository.save( NewRoulette( id = idGenerator.generateId(SEQUENCE_NAME), creatorId = creatorId, @@ -50,7 +50,7 @@ class NewRouletteService( ) ) - rouletteList.toMutableList().add(newRoulette) + rouletteList = repository.findByCreatorId(creatorId) } }