fix: add missing imports and update status response type
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -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<AppState>,
|
||||
) -> Result<Json<ApiResponse<StatusInfo>>, StatusCode> {
|
||||
) -> Result<Json<StatusInfoResponse>, 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,
|
||||
|
||||
Reference in New Issue
Block a user