From 22dc0392f7af942829e74f3c07a8b9619dc86deb Mon Sep 17 00:00:00 2001 From: Miseong Kim Date: Tue, 5 Nov 2024 01:09:16 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20sse=20connect=20api=20endpoint=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bottles/api/bottle/controller/TabEventController.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/main/kotlin/com/nexters/bottles/api/bottle/controller/TabEventController.kt b/api/src/main/kotlin/com/nexters/bottles/api/bottle/controller/TabEventController.kt index e56ba35..eb77c06 100644 --- a/api/src/main/kotlin/com/nexters/bottles/api/bottle/controller/TabEventController.kt +++ b/api/src/main/kotlin/com/nexters/bottles/api/bottle/controller/TabEventController.kt @@ -5,15 +5,17 @@ import com.nexters.bottles.api.global.resolver.AuthUserId import com.nexters.bottles.app.bottle.service.TabEventService import org.springframework.http.MediaType import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController import org.springframework.web.servlet.mvc.method.annotation.SseEmitter @RestController +@RequestMapping("/api/v1") class TabEventController( private val tabEventService: TabEventService ) { - @GetMapping("/connect", produces = [MediaType.TEXT_EVENT_STREAM_VALUE]) + @GetMapping("/connect/sse", produces = [MediaType.TEXT_EVENT_STREAM_VALUE]) @AuthRequired fun connectSse(@AuthUserId userId: Long): SseEmitter { val sseEmitter = tabEventService.connectSse(userId)