🐛 Fix issues from pull request

This commit is contained in:
Meier Lukas
2023-03-30 23:35:29 +02:00
parent 77c8cb8f9e
commit e2311fedc0
2 changed files with 3 additions and 3 deletions

View File

@@ -27,8 +27,8 @@ export const getConfig = (name: string): BackendConfigType => {
...backendConfig, ...backendConfig,
widgets: backendConfig.widgets.map((widget) => ({ widgets: backendConfig.widgets.map((widget) => ({
...widget, ...widget,
id: uuidv4(), id: uuidRegex.test(widget.id) ? widget.id : uuidv4(),
type: widget.id, type: !uuidRegex.test(widget.id) ? widget.id : widget.type,
})), })),
}; };

View File

@@ -63,7 +63,7 @@ function CalendarTile({ widget }: CalendarTileProps) {
await fetch( await fetch(
`/api/modules/calendar?year=${month.getFullYear()}&month=${ `/api/modules/calendar?year=${month.getFullYear()}&month=${
month.getMonth() + 1 month.getMonth() + 1
}&configName=${configName}&id=${widget.id}` }&configName=${configName}&widgetId=${widget.id}`
) )
).json()) as MediasType, ).json()) as MediasType,
}); });