From 45519238fa25e1c4a1f4e79ae43938551f33621b Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Fri, 3 Jan 2025 16:16:31 +0100 Subject: [PATCH] preview endpoint query parameters are not required and set to the default --- server/src/refresh/calendar.rs | 4 ++-- server/src/routes/locations/preview.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/refresh/calendar.rs b/server/src/refresh/calendar.rs index c00f39d60..734cb6137 100644 --- a/server/src/refresh/calendar.rs +++ b/server/src/refresh/calendar.rs @@ -93,7 +93,7 @@ pub async fn all_entries(pool: &PgPool) { } } -#[tracing::instrument(skip(api,pool))] +#[tracing::instrument(skip(api, pool))] async fn refresh_events(pool: &PgPool, api: &APIRequestor, mut ids: LimitedVec) { debug!("Downloading {len} room-calendars", len = ids.len()); // we want to scrape all ~2k rooms once per hour @@ -113,7 +113,7 @@ async fn refresh_events(pool: &PgPool, api: &APIRequestor, mut ids: LimitedVec anyhow::Result<()> { let sync_start = chrono::Utc::now(); if let Err(e) = Event::update_last_calendar_scrape_at(pool, &id, &sync_start).await { diff --git a/server/src/routes/locations/preview.rs b/server/src/routes/locations/preview.rs index fbb1ca431..3a0bc748d 100644 --- a/server/src/routes/locations/preview.rs +++ b/server/src/routes/locations/preview.rs @@ -129,6 +129,7 @@ impl Display for PreviewFormat { } #[derive(Deserialize, Default, Debug, utoipa::IntoParams)] +#[serde(default)] struct QueryArgs { #[serde(flatten)] lang: localisation::LangQueryArgs,