修改了get_weather方法,现在可以实现前端的需求了
This commit is contained in:
@@ -82,8 +82,8 @@ pub struct WeatherDataBrief {
|
||||
#[sqlx(rename = "min")]
|
||||
pub min: i32,
|
||||
|
||||
pub longitude: f64,
|
||||
pub latidute: f64,
|
||||
pub longitude: String,
|
||||
pub latitude: String,
|
||||
}
|
||||
|
||||
// 在models.rs中添加(可放在WeatherDataBrief下方)
|
||||
@@ -151,8 +151,8 @@ pub struct WeatherData {
|
||||
#[sqlx(rename = "inspectiontype")]
|
||||
pub inspection_type: Option<String>,
|
||||
|
||||
pub latitude: f64,
|
||||
pub longitude: f64,
|
||||
pub latitude: String,
|
||||
pub longitude: String,
|
||||
|
||||
#[serde(rename = "lowCloudiness")]
|
||||
#[sqlx(rename = "lowcloudiness")]
|
||||
|
||||
Reference in New Issue
Block a user