fix(cms): add _resolve parameter to getCalendarItems for comprehensive data retrieval
- Updated getCalendarItems function to include the _resolve parameter set to "all", ensuring all related data is fetched. - Refined getHref function in DeadlineBannerBlock.svelte to simplify link handling by directly checking for the url property.
This commit is contained in:
@@ -676,6 +676,7 @@ export async function getCalendarItems(
|
||||
const base = getBaseUrl();
|
||||
const url = new URL(`${base}/api/content/calendar_item`);
|
||||
url.searchParams.set("_per_page", "1000");
|
||||
url.searchParams.set("_resolve", "all");
|
||||
if (options?.locale) url.searchParams.set("_locale", options.locale);
|
||||
const res = await fetch(url.toString());
|
||||
if (!res.ok) return [];
|
||||
|
||||
Reference in New Issue
Block a user