fix: remove duplicate / route in gateway that causes panic on startup

gateway_index_handler and embedded_index both registered at /. The
embedded React frontend should serve /. Remove the old gateway
index handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-04-15 18:57:35 +00:00
parent 744cc9dca4
commit 0969fb5d51
-1
View File
@@ -1678,7 +1678,6 @@ pub async fn run(config_path: &Path, port: u16) -> Result<(), std::io::Error> {
*state_arc.bot_handle.lock().await = bot_abort; *state_arc.bot_handle.lock().await = bot_abort;
let route = poem::Route::new() let route = poem::Route::new()
.at("/", poem::get(gateway_index_handler))
.at("/bot-config", poem::get(gateway_bot_config_page_handler)) .at("/bot-config", poem::get(gateway_bot_config_page_handler))
.at("/api/gateway", poem::get(gateway_api_handler)) .at("/api/gateway", poem::get(gateway_api_handler))
.at("/api/gateway/switch", poem::post(gateway_switch_handler)) .at("/api/gateway/switch", poem::post(gateway_switch_handler))