Files
asd-backend/src/handlers/mod.rs

56 lines
1.7 KiB
Rust

// handlers 模块 - 按功能拆分路由处理器
pub mod admin;
pub mod auth;
pub mod favorites;
pub mod health;
pub mod meta;
pub mod payment;
pub mod sentry;
pub mod static_files;
pub mod user;
pub mod weather;
// 编译时嵌入目录(供 handlers 使用)
pub use include_dir::{Dir, include_dir};
pub static STATIC_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/static");
pub static TEMPLATES_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/templates");
// re-export handlers for convenient use in main.rs
pub use admin::admin_get_user;
pub use admin::admin_update_user_payment;
pub use admin::admin_force_confirm_order;
pub use admin::admin_refund_order;
pub use auth::login;
pub use auth::mock_login;
pub use auth::refresh_token;
pub use auth::web_generate_login_code;
pub use auth::web_login_confirm;
pub use auth::web_login_auto_confirm;
pub use favorites::{add_favorite, get_favorites, remove_favorite};
pub use health::health_check;
pub use meta::root;
pub use static_files::serve_static_files;
pub use user::get_current_user_profile;
pub use user::save_user_profile;
pub use weather::delete_weather;
pub use weather::generate_temp_token_handler;
pub use weather::get_weather_brief;
pub use weather::get_weather_details;
pub use weather::post_weather_data;
pub use payment::alipay_notify;
pub use payment::alipay_pay_page;
pub use payment::alipay_refund_notify;
pub use payment::cancel_order;
pub use payment::create_order;
pub use payment::generate_code;
pub use payment::get_user_quota;
pub use payment::mock_confirm;
pub use payment::sync_order;
pub use payment::get_user_orders;
pub use payment::payment_index;
pub use payment::payment_login_status;
pub use payment::payment_page;
pub use payment::payment_success;
pub use sentry::report_frontend_error;