From 16e248ea36b8f61e4e94cf1c9c229929340db4d1 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Mon, 16 Jul 2018 02:14:44 +0200 Subject: Rework resources representations --- .../src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend/src/main/kotlin/org/luxons') diff --git a/backend/src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt b/backend/src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt index bebb3233..743e3d1a 100644 --- a/backend/src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt +++ b/backend/src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt @@ -10,6 +10,8 @@ import org.springframework.web.socket.config.annotation.StompEndpointRegistry import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer import org.springframework.web.socket.server.support.DefaultHandshakeHandler +const val SEVEN_WONDERS_WS_ENDPOINT = "/seven-wonders-websocket" + @Configuration @EnableWebSocketMessageBroker class WebSocketConfig @Autowired constructor(private val topicSubscriptionInterceptor: TopicSubscriptionInterceptor) : @@ -25,7 +27,7 @@ class WebSocketConfig @Autowired constructor(private val topicSubscriptionInterc } override fun registerStompEndpoints(registry: StompEndpointRegistry) { - registry.addEndpoint("/seven-wonders-websocket") + registry.addEndpoint(SEVEN_WONDERS_WS_ENDPOINT) .setHandshakeHandler(handshakeHandler()) .setAllowedOrigins("http://localhost:3000") // to allow frontend server proxy requests in dev mode .withSockJS() -- cgit