mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-18 03:01:09 +01:00
✨ Migrate tiles from id to type
This commit is contained in:
@@ -39,7 +39,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
const config = getConfig(configName);
|
||||
|
||||
// Find the calendar widget in the config
|
||||
const calendar = config.widgets.find((w) => w.id === 'calendar');
|
||||
const calendar = config.widgets.find((w) => w.type === 'calendar');
|
||||
const useSonarrv4 = calendar?.properties.useSonarrv4 ?? false;
|
||||
|
||||
const mediaAppIntegrationTypes: AppIntegrationType['type'][] = [
|
||||
|
||||
@@ -14,7 +14,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
const config = getConfig(configName);
|
||||
|
||||
const dashDotWidget = config.widgets.find((x) => x.id === 'dashdot');
|
||||
const dashDotWidget = config.widgets.find((x) => x.type === 'dashdot');
|
||||
|
||||
if (!dashDotWidget) {
|
||||
return res.status(400).json({
|
||||
|
||||
@@ -13,7 +13,7 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
}
|
||||
|
||||
const config = getConfig(configName);
|
||||
const dashDotWidget = config.widgets.find((x) => x.id === 'dashdot');
|
||||
const dashDotWidget = config.widgets.find((x) => x.type === 'dashdot');
|
||||
|
||||
if (!dashDotWidget) {
|
||||
return res.status(400).json({
|
||||
|
||||
@@ -29,7 +29,7 @@ export const Get = async (request: NextApiRequest, response: NextApiResponse) =>
|
||||
const configName = getCookie('config-name', { req: request });
|
||||
const config = getConfig(configName?.toString() ?? 'default');
|
||||
|
||||
const rssWidget = config.widgets.find((x) => x.id === 'rss') as IRssWidget | undefined;
|
||||
const rssWidget = config.widgets.find((x) => x.type === 'rss') as IRssWidget | undefined;
|
||||
|
||||
if (
|
||||
!rssWidget ||
|
||||
|
||||
Reference in New Issue
Block a user