mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
🐛 Fix pull request issues
This commit is contained in:
@@ -5,8 +5,9 @@ import Consola from 'consola';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { z } from 'zod';
|
||||
import { AppIntegrationType } from '../../../types/app';
|
||||
import { AppIntegrationType, IntegrationType } from '../../../types/app';
|
||||
import { getConfig } from '../../../tools/config/getConfig';
|
||||
import { checkIntegrationsType } from '~/tools/client/app-properties';
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Filter out if the reuqest is a POST or a GET
|
||||
@@ -51,14 +52,14 @@ async function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
const calendar = config.widgets.find((w) => w.type === 'calendar' && w.id === widgetId);
|
||||
const useSonarrv4 = calendar?.properties.useSonarrv4 ?? false;
|
||||
|
||||
const mediaAppIntegrationTypes: AppIntegrationType['type'][] = [
|
||||
const mediaAppIntegrationTypes = [
|
||||
'sonarr',
|
||||
'radarr',
|
||||
'readarr',
|
||||
'lidarr',
|
||||
];
|
||||
const mediaApps = config.apps.filter(
|
||||
(app) => app.integration && mediaAppIntegrationTypes.includes(app.integration.type)
|
||||
] as const satisfies readonly IntegrationType[];
|
||||
const mediaApps = config.apps.filter((app) =>
|
||||
checkIntegrationsType(app.integration, mediaAppIntegrationTypes)
|
||||
);
|
||||
|
||||
const IntegrationTypeEndpointMap = new Map<AppIntegrationType['type'], string>([
|
||||
|
||||
Reference in New Issue
Block a user