Skip to content

Commit

Permalink
fix: use events path under /api
Browse files Browse the repository at this point in the history
  • Loading branch information
d1snin committed Apr 14, 2024
1 parent 6f7bab4 commit 584511f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ public class DefaultBeamClient(
requireWsBaseUrl()

eventHandlingScope.launch {
httpClient.webSocketEvents(reference) {
httpClient.webSocketEvents(reference, path = Paths.EVENTS) {
while (true) {
val event = try {
receiveWebSocketEvent<T>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public object Paths {

public const val DAEMON_BASE: String = "/api"

public const val EVENTS: String = "/api/events"

public const val GET_DAEMON_STATUS: String = "/api/status"

public const val POST_SPACE: String = "/api/spaces"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package dev.d1s.beam.daemon.configuration

import dev.d1s.beam.commons.Paths
import dev.d1s.exkt.ktor.server.koin.configuration.ApplicationConfigurer
import dev.d1s.ktor.events.server.WebSocketEventChannel
import dev.d1s.ktor.events.server.WebSocketEvents
Expand All @@ -35,7 +36,7 @@ object WebSocketEvents : ApplicationConfigurer {
}

routing {
webSocketEvents()
webSocketEvents(route = Paths.EVENTS)
}

module.single {
Expand Down

0 comments on commit 584511f

Please sign in to comment.