Skip to content

Commit

Permalink
chore: replace websocket protocol with http protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
yHSJ committed Nov 26, 2024
1 parent 89fd430 commit c6b1ead
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 96 deletions.
7 changes: 6 additions & 1 deletion crates/rpc/src/routes/add_player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ pub async fn add_player(
let (external_url, local_url): (String, String) = node
.status
.as_ref()
.map(|status| (status.external_url.clone(), status.local_url.clone()))
.map(|status| {
(
status.external_url.clone().replace("ws://", "https://"),
status.local_url.clone().replace("ws://", "https://"),
)
})
.unwrap_or_default();

let url = local_url + "/game/add_player?address=" + address;
Expand Down
28 changes: 0 additions & 28 deletions crates/rpc/src/routes/cleanup.rs

This file was deleted.

29 changes: 0 additions & 29 deletions crates/rpc/src/routes/end_game.rs

This file was deleted.

7 changes: 6 additions & 1 deletion crates/rpc/src/routes/new_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ pub async fn new_game(address: &str, state: &State<ClusterState>) -> Result<Json
let (external_url, local_url): (String, String) = node
.status
.as_ref()
.map(|status| (status.external_url.clone(), status.local_url.clone()))
.map(|status| {
(
status.external_url.clone().replace("ws://", "https://"),
status.local_url.clone().replace("ws://", "https://"),
)
})
.unwrap_or_default();

let url = local_url + "/game/new_game?address=" + address;
Expand Down
37 changes: 0 additions & 37 deletions crates/rpc/src/routes/start_game.rs

This file was deleted.

0 comments on commit c6b1ead

Please sign in to comment.