From 252399007565f5fb66137e4b6029adceae757f75 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 28 Aug 2025 16:59:05 -0300 Subject: [PATCH] fix: add missing imports and update status response type Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) --- src/modes/server/api/status.rs | 6 +++--- src/services/status_service.rs | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modes/server/api/status.rs b/src/modes/server/api/status.rs index 1cfcf8f..5c7273e 100644 --- a/src/modes/server/api/status.rs +++ b/src/modes/server/api/status.rs @@ -4,7 +4,7 @@ use axum::{ response::Json, }; -use crate::modes::server::common::{AppState, ApiResponse}; +use crate::modes::server::common::{AppState, ApiResponse, StatusInfoResponse}; use crate::common::status::StatusInfo; #[utoipa::path( @@ -25,7 +25,7 @@ use crate::common::status::StatusInfo; )] pub async fn handle_status( State(state): State, -) -> Result>, StatusCode> { +) -> Result, StatusCode> { // Get database path let db_path = state.db.lock().await.path().unwrap_or("unknown").to_string(); @@ -37,7 +37,7 @@ pub async fn handle_status( db_path.into(), ); - let response = ApiResponse { + let response = StatusInfoResponse { success: true, data: Some(status_info), error: None, diff --git a/src/services/status_service.rs b/src/services/status_service.rs index 22ac512..00ac980 100644 --- a/src/services/status_service.rs +++ b/src/services/status_service.rs @@ -4,6 +4,8 @@ use crate::meta_plugin::MetaPluginType; use crate::compression_engine::CompressionType; use clap::Command; use std::path::PathBuf; +use std::str::FromStr; +use strum::IntoEnumIterator; pub struct StatusService;