summaryrefslogtreecommitdiff
path: root/backend/src/main/kotlin
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2018-07-16 02:14:44 +0200
committerJoffrey BION <joffrey.bion@gmail.com>2018-07-16 02:14:44 +0200
commit16e248ea36b8f61e4e94cf1c9c229929340db4d1 (patch)
treede4d8dd8faceefb9d82b07edcf6103fd9d0f5848 /backend/src/main/kotlin
parentAdd DTO classes for webservice output (diff)
downloadseven-wonders-16e248ea36b8f61e4e94cf1c9c229929340db4d1.tar.gz
seven-wonders-16e248ea36b8f61e4e94cf1c9c229929340db4d1.tar.bz2
seven-wonders-16e248ea36b8f61e4e94cf1c9c229929340db4d1.zip
Rework resources representations
Diffstat (limited to 'backend/src/main/kotlin')
-rw-r--r--backend/src/main/kotlin/org/luxons/sevenwonders/config/WebSocketConfig.kt4
1 files changed, 3 insertions, 1 deletions
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()
bgstack15