From 58a0b6858a902e3550f2557996fe9fdafdcfcc9a Mon Sep 17 00:00:00 2001 From: Milky0217 Date: Sun, 28 Sep 2025 14:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E5=BA=93=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db.rs | 2 +- src/main.rs | 6 +++--- src/models.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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")]