Skip to content

Commit

Permalink
feat: sse connect api endpoint 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
miseongk committed Nov 4, 2024
1 parent 7e462a8 commit 22dc039
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22dc039

Please sign in to comment.