Some checks failed
BotServer CI / build (push) Failing after 1m34s
Split 20+ files over 1000 lines into focused subdirectories for better maintainability and code organization. All changes maintain backward compatibility through re-export wrappers. Major splits: - attendance/llm_assist.rs (2074→7 modules) - basic/keywords/face_api.rs → face_api/ (7 modules) - basic/keywords/file_operations.rs → file_ops/ (8 modules) - basic/keywords/hear_talk.rs → hearing/ (6 modules) - channels/wechat.rs → wechat/ (10 modules) - channels/youtube.rs → youtube/ (5 modules) - contacts/mod.rs → contacts_api/ (6 modules) - core/bootstrap/mod.rs → bootstrap/ (5 modules) - core/shared/admin.rs → admin_*.rs (5 modules) - designer/canvas.rs → canvas_api/ (6 modules) - designer/mod.rs → designer_api/ (6 modules) - docs/handlers.rs → handlers_api/ (11 modules) - drive/mod.rs → drive_handlers.rs, drive_types.rs - learn/mod.rs → types.rs - main.rs → main_module/ (7 modules) - meet/webinar.rs → webinar_api/ (8 modules) - paper/mod.rs → (10 modules) - security/auth.rs → auth_api/ (7 modules) - security/passkey.rs → (4 modules) - sources/mod.rs → sources_api/ (5 modules) - tasks/mod.rs → task_api/ (5 modules) Stats: 38,040 deletions, 1,315 additions across 318 files Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
34 lines
1.5 KiB
Rust
34 lines
1.5 KiB
Rust
pub mod error;
|
|
pub mod handlers;
|
|
pub mod storage;
|
|
pub mod types;
|
|
pub mod ui;
|
|
|
|
use axum::{
|
|
routing::{delete, get, post, put},
|
|
Router,
|
|
};
|
|
use std::sync::Arc;
|
|
|
|
use crate::core::shared::state::AppState;
|
|
|
|
pub use error::DashboardsError;
|
|
pub use handlers::*;
|
|
pub use storage::*;
|
|
pub use types::*;
|
|
|
|
pub fn configure_dashboards_routes() -> Router<Arc<AppState>> {
|
|
Router::new()
|
|
.route("/api/dashboards", get(handle_list_dashboards).post(handle_create_dashboard))
|
|
.route("/api/dashboards/templates", get(handle_get_templates))
|
|
.route("/api/dashboards/:id", get(handle_get_dashboard).put(handle_update_dashboard).delete(handle_delete_dashboard))
|
|
.route("/api/dashboards/:id/widgets", post(handle_add_widget))
|
|
.route("/api/dashboards/:id/widgets/:widget_id", put(handle_update_widget).delete(handle_delete_widget))
|
|
.route("/api/dashboards/:id/widgets/:widget_id/data", get(handle_get_widget_data))
|
|
.route("/api/dashboards/sources", get(handle_list_data_sources).post(handle_create_data_source))
|
|
.route("/api/dashboards/sources/:id/test", post(handle_test_data_source))
|
|
.route("/api/dashboards/sources/:id", delete(handle_delete_data_source))
|
|
.route("/api/dashboards/data-sources", get(handle_list_data_sources).post(handle_create_data_source))
|
|
.route("/api/dashboards/data-sources/test", post(handle_test_data_source_no_id))
|
|
.route("/api/dashboards/query", post(handle_conversational_query))
|
|
}
|