From 0de289101c2a2759853c2f532573b5e124601b46 Mon Sep 17 00:00:00 2001 From: sanj <67624670+iodrift@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:30:59 -0800 Subject: [PATCH] Auto-update: Fri Nov 15 09:30:59 PST 2024 --- sijapi/routers/note.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sijapi/routers/note.py b/sijapi/routers/note.py index 8aac687..4e20586 100644 --- a/sijapi/routers/note.py +++ b/sijapi/routers/note.py @@ -321,7 +321,7 @@ Obsidian helper. Takes a datetime and creates a new daily note. Note: it uses th fm_day = date_time.strftime("%Y-%m-%d") _, weather_path = assemble_journal_path(date_time, filename="Weather", extension=".md", no_timestamp = True) - weather_note = await update_dn_weather(date_time) + weather_note = await update_dn_weather(date_time, force_refresh=True) weather_embed = f"![[{weather_path}]]\n" events = await update_daily_note_events(date_time) @@ -568,16 +568,17 @@ async def note_weather_get( @note.post("/update/note/{date}") -async def post_update_daily_weather_and_calendar_and_timeslips(date: str, refresh: str="False") -> PlainTextResponse: +async def post_update_daily_weather_and_calendar_and_timeslips(date: str, refresh: str="True") -> PlainTextResponse: date_time = await gis.dt(date) l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our dt_datetime in post_update_daily_weather_and_calendar_and_timeslips.") - force_refresh_weather = refresh == "True" + force_refresh_weather = refresh == "True" await update_dn_weather(date_time, force_refresh_weather) await update_daily_note_events(date_time) await build_daily_timeslips(date_time) return f"[Refresh]({Sys.URL}/update/note/{date_time.strftime('%Y-%m-%d')}" + async def update_dn_weather(date_time: dt_datetime, force_refresh: bool = False, lat: float = None, lon: float = None): l.debug(f"Using {date_time.strftime('%Y-%m-%d %H:%M:%S')} as our datetime in update_dn_weather.") try: