feat: 添加收藏功能 API
- models.rs: 添加 is_favorite 字段到 WeatherData 和 WeatherDataBrief - db.rs: 添加 get_favorites_list 和 set_weather_favorite 函数 - handlers/favorites.rs: 新建收藏 API 处理器 - handlers/mod.rs: 导出 favorites 模块 - main.rs: 注册收藏 API 路由
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// handlers 模块 - 按功能拆分路由处理器
|
||||
pub mod admin;
|
||||
pub mod auth;
|
||||
pub mod favorites;
|
||||
pub mod health;
|
||||
pub mod payment;
|
||||
pub mod static_files;
|
||||
@@ -16,6 +17,7 @@ pub static TEMPLATES_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/templates");
|
||||
pub use admin::admin_get_user;
|
||||
pub use admin::admin_update_user_payment;
|
||||
pub use auth::login;
|
||||
pub use favorites::{add_favorite, get_favorites, remove_favorite};
|
||||
pub use health::health_check;
|
||||
pub use static_files::serve_static_files;
|
||||
pub use user::get_current_user_profile;
|
||||
|
||||
Reference in New Issue
Block a user