fix: update module imports to reflect moved files in server mode
Co-authored-by: aider (openai/andrew/openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
@@ -16,15 +16,13 @@ use tower_http::trace::TraceLayer;
|
|||||||
use crate::Args;
|
use crate::Args;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
mod status;
|
mod api;
|
||||||
mod items;
|
|
||||||
mod content;
|
|
||||||
mod docs;
|
mod docs;
|
||||||
|
|
||||||
pub use common::{ServerConfig, AppState, logging_middleware};
|
pub use common::{ServerConfig, AppState, logging_middleware};
|
||||||
use status::handle_status;
|
use api::item::{handle_list_items, handle_get_item, handle_post_item, handle_delete_item};
|
||||||
use items::{handle_list_items, handle_get_item, handle_put_item, handle_delete_item};
|
use api::item::{handle_get_content_latest, handle_get_content};
|
||||||
use content::{handle_get_content_latest, handle_get_content};
|
use api::status::handle_status;
|
||||||
use docs::{handle_openapi, handle_swagger_ui};
|
use docs::{handle_openapi, handle_swagger_ui};
|
||||||
|
|
||||||
pub fn mode_server(
|
pub fn mode_server(
|
||||||
@@ -67,7 +65,7 @@ async fn run_server(
|
|||||||
|
|
||||||
let app = Router::new()
|
let app = Router::new()
|
||||||
.route("/status", get(handle_status))
|
.route("/status", get(handle_status))
|
||||||
.route("/item/", get(handle_list_items).put(handle_put_item))
|
.route("/item/", get(handle_list_items).put(handle_post_item))
|
||||||
.route("/item/:id", get(handle_get_item).delete(handle_delete_item))
|
.route("/item/:id", get(handle_get_item).delete(handle_delete_item))
|
||||||
.route("/content", get(handle_get_content_latest))
|
.route("/content", get(handle_get_content_latest))
|
||||||
.route("/content/:id", get(handle_get_content))
|
.route("/content/:id", get(handle_get_content))
|
||||||
|
|||||||
Reference in New Issue
Block a user