show waterlevel for the next days #466
@ -19,13 +19,7 @@ pub async fn update(db: &SqlitePool, api_key: &str) -> Result<(), String> {
|
||||
};
|
||||
let max_temp = d.temp.max;
|
||||
let wind_gust = d.wind_gust;
|
||||
let Some(rain_mm) = d.rain else {
|
||||
println!(
|
||||
"Skipping weather import of {} as there's no rain prognosed",
|
||||
date
|
||||
);
|
||||
continue;
|
||||
};
|
||||
let rain_mm = d.rain.unwrap_or(0.);
|
||||
|
||||
Weather::create(
|
||||
&mut tx,
|
||||
|
@ -101,7 +101,7 @@
|
||||
</h2>
|
||||
{% if day.weather %}
|
||||
<div class="bg-gray-300 rounded text-center">
|
||||
Max temp: {{ day.weather.max_temp }}° • Windböe: {{ day.weather.wind_gust }} km/h • Regen: {{ day.weather.rain_mm }} mm
|
||||
Max temp: {{ day.weather.max_temp | round }}° • Windböe: {{ day.weather.wind_gust | round }} km/h • Regen: {{ day.weather.rain_mm | round }} mm
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if day.planned_events | length > 0 or day.trips | length > 0 %}
|
||||
|
Loading…
Reference in New Issue
Block a user