diff --git a/src/main/kotlin/com/hero/alignlab/domain/group/application/GroupUserScoreService.kt b/src/main/kotlin/com/hero/alignlab/domain/group/application/GroupUserScoreService.kt index caad4f2..5b17b7e 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/group/application/GroupUserScoreService.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/group/application/GroupUserScoreService.kt @@ -5,6 +5,7 @@ import com.hero.alignlab.config.database.TransactionTemplates import com.hero.alignlab.domain.group.domain.GroupUser import com.hero.alignlab.domain.group.domain.GroupUserScore import com.hero.alignlab.domain.group.infrastructure.GroupUserScoreRepository +import com.hero.alignlab.ws.handler.ReactiveGroupUserWebSocketHandler import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.springframework.stereotype.Service @@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional class GroupUserScoreService( private val groupUserScoreRepository: GroupUserScoreRepository, private val txTemplates: TransactionTemplates, + private val wsHandler: ReactiveGroupUserWebSocketHandler, ) { suspend fun findAllByGroupId(groupId: Long): List { return withContext(Dispatchers.IO) { @@ -78,6 +80,8 @@ class GroupUserScoreService( txTemplates.writer.coExecuteOrNull { saveSync(createOrUpdateGroupUserScore) } + + wsHandler.launchSendEvent(groupUser.groupId) } suspend fun findAllByUids(uids: List): List {