diff --git a/src/db.rs b/src/db.rs index 1bfdebc..db2634b 100644 --- a/src/db.rs +++ b/src/db.rs @@ -126,7 +126,7 @@ pub async fn get_weather_details(pool: &PgPool, weather_id: i32) -> Result, pool: web::Data, claims: web::ReqData, @@ -368,7 +368,7 @@ fn create_server_config( .wrap(from_fn(jwt_middleware)) // 关键修改:用 from_fn 包装 .service(post_weather_data) .service(get_weather_details) // 新增 - .service(get_weather) // 新增 + .service(get_weather_brief) // 新增 .service(delete_weather), // 新增 ) } diff --git a/src/models.rs b/src/models.rs index a90050a..ee0fab1 100644 --- a/src/models.rs +++ b/src/models.rs @@ -151,8 +151,8 @@ pub struct WeatherData { #[sqlx(rename = "inspectiontype")] pub inspection_type: Option, - pub latitude: f64, - pub longitude: f64, + pub latitude: String, + pub longitude: String, #[serde(rename = "lowCloudiness")] #[sqlx(rename = "lowcloudiness")]