From e2311fedc029333b54b41737f3b245d5a54a4f8b Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Thu, 30 Mar 2023 23:35:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20issues=20from=20pull=20req?= =?UTF-8?q?uest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/config/getConfig.ts | 4 ++-- src/widgets/calendar/CalendarTile.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/config/getConfig.ts b/src/tools/config/getConfig.ts index 3d6139a9f..0ab1ea62a 100644 --- a/src/tools/config/getConfig.ts +++ b/src/tools/config/getConfig.ts @@ -27,8 +27,8 @@ export const getConfig = (name: string): BackendConfigType => { ...backendConfig, widgets: backendConfig.widgets.map((widget) => ({ ...widget, - id: uuidv4(), - type: widget.id, + id: uuidRegex.test(widget.id) ? widget.id : uuidv4(), + type: !uuidRegex.test(widget.id) ? widget.id : widget.type, })), }; diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index 389aa7e5f..b5cf83531 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -63,7 +63,7 @@ function CalendarTile({ widget }: CalendarTileProps) { await fetch( `/api/modules/calendar?year=${month.getFullYear()}&month=${ month.getMonth() + 1 - }&configName=${configName}&id=${widget.id}` + }&configName=${configName}&widgetId=${widget.id}` ) ).json()) as MediasType, });