mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Move the websocket to /websocket/ws from /ws - part 1 of cleaning up the Axum Router tree.
This commit is contained in:
parent
32d821b3af
commit
8eaa9c6324
@ -6,7 +6,7 @@ export function subscribeWS(channels, handler) {
|
||||
ws.close();
|
||||
}
|
||||
|
||||
ws = new WebSocket('ws://' + window.location.host + '/ws');
|
||||
ws = new WebSocket('ws://' + window.location.host + '/websocket/ws');
|
||||
ws.onopen = () => {
|
||||
for (let i=0; i<channels.length; i++) {
|
||||
ws.send("{ \"channel\" : \"" + channels[i] + "\"}");
|
||||
|
@ -14,7 +14,7 @@ pub async fn spawn_webserver() -> Result<()> {
|
||||
|
||||
// Construct the router from parts
|
||||
let router = Router::new()
|
||||
.nest("/", websocket_router())
|
||||
.nest("/websocket/", websocket_router())
|
||||
.nest("/vendor", vendor_route()?) // Serve /vendor as purely static
|
||||
.nest("/", static_routes()?)
|
||||
.nest("/local-api", local_api());
|
||||
|
Loading…
Reference in New Issue
Block a user