Skip to content

Commit 6ceb4c8

Browse files
committed
add: publishEvent BoardViewEvent logic
1 parent f8af4ee commit 6ceb4c8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/kotlin/gogo/gogostage/domain/community/root/application/CommunityServiceImpl.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import gogo.gogostage.domain.community.board.application.BoardProcessor
44
import gogo.gogostage.domain.community.board.application.BoardReader
55
import gogo.gogostage.domain.community.root.application.dto.*
66
import gogo.gogostage.domain.community.root.event.BoardCreateEvent
7+
import gogo.gogostage.domain.community.root.event.BoardViewEvent
78
import gogo.gogostage.domain.community.root.event.CommentCreateEvent
89
import gogo.gogostage.domain.community.root.persistence.SortType
910
import gogo.gogostage.domain.game.persistence.GameCategory
@@ -56,7 +57,16 @@ class CommunityServiceImpl(
5657
stageValidator.validStage(student, board.community.stage.id)
5758
stageValidator.validProfanityFilter(student, board)
5859
communityProcessor.saveBoardView(board, student.studentId)
59-
return communityReader.readBoardInfo(isFiltered, board, student)
60+
val response = communityReader.readBoardInfo(isFiltered, board, student)
61+
62+
applicationEventPublisher.publishEvent(
63+
BoardViewEvent(
64+
boardId = boardId,
65+
studentId = student.studentId,
66+
)
67+
)
68+
69+
return response
6070
}
6171

6272
@Transactional

0 commit comments

Comments
 (0)