From 6d7e1b3fc405b79d26a94b3b8be2ff41018923c4 Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Tue, 31 Dec 2024 11:09:46 +0100 Subject: [PATCH] Update apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx Co-authored-by: Meier Lukas --- .../manage/integrations/new/_integration-new-form.tsx | 2 +- packages/api/src/router/integration/integration-router.ts | 3 +-- .../src/router/test/integration/integration-router.spec.ts | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx index c2ed4bd5a..a223e3bfc 100644 --- a/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx +++ b/apps/nextjs/src/app/[locale]/manage/integrations/new/_integration-new-form.tsx @@ -111,7 +111,7 @@ export const NewIntegrationForm = ({ searchParams }: NewIntegrationFormProps) => diff --git a/packages/api/src/router/integration/integration-router.ts b/packages/api/src/router/integration/integration-router.ts index b50ca018e..7a1345557 100644 --- a/packages/api/src/router/integration/integration-router.ts +++ b/packages/api/src/router/integration/integration-router.ts @@ -22,7 +22,6 @@ import { integrationKinds, integrationSecretKindObject, } from "@homarr/definitions"; -import { getIconForNameAsync } from "@homarr/icons"; import { integrationCreator } from "@homarr/integrations"; import { validation, z } from "@homarr/validation"; @@ -434,7 +433,7 @@ const getNextValidShortNameForSearchEngineAsync = async (db: Database, integrati }, }); - const usedShortNames = searchEngines.flatMap((searchEngine) => searchEngine.short); + const usedShortNames = searchEngines.flatMap((searchEngine) => searchEngine.short.toLowerCase()); const nameByIntegrationName = integrationName.slice(0, 1).toLowerCase(); if (!usedShortNames.includes(nameByIntegrationName)) { diff --git a/packages/api/src/router/test/integration/integration-router.spec.ts b/packages/api/src/router/test/integration/integration-router.spec.ts index 0fc5d7121..3a3efb1ed 100644 --- a/packages/api/src/router/test/integration/integration-router.spec.ts +++ b/packages/api/src/router/test/integration/integration-router.spec.ts @@ -239,7 +239,9 @@ describe("create should create a new integration", () => { expect(dbSearchEngine!.integrationId).toBe(dbIntegration!.id); expect(dbSearchEngine!.short).toBe("j"); expect(dbSearchEngine!.name).toBe(input.name); - expect(dbSearchEngine!.iconUrl).toBe("https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/svg/homarr.svg"); + expect(dbSearchEngine!.iconUrl).toBe( + "https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/jellyseerr.png", + ); }); test("without create integration access should throw permission error", async () => {