后端代码优化

This commit is contained in:
xintaofei
2026-03-29 18:55:47 +08:00
parent 080a16f26c
commit a7f628ee21
10 changed files with 39 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ pub struct StartWebServerParams {
pub async fn start_web_server(
Extension(state): Extension<Arc<AppState>>,
Json(params): Json<StartWebServerParams>,
Json(_params): Json<StartWebServerParams>,
) -> Result<Json<WebServerInfo>, AppCommandError> {
// In web mode, the server is already running (this handler itself is served by it).
// This endpoint is mainly useful in Tauri mode. Return current status as a noop.

View File

@@ -122,6 +122,7 @@ pub fn get_local_addresses(port: u16) -> Vec<String> {
// ── Core logic (shared by Tauri commands and web handlers) ──
#[allow(dead_code)]
pub(crate) async fn do_start_web_server_with_state(
app_state: Arc<AppState>,
static_dir: PathBuf,