From e353f15a3caad5b8fb8aa8dadfc07f620743c8b1 Mon Sep 17 00:00:00 2001 From: Zyfax Date: Tue, 3 Jun 2025 09:11:01 +0200 Subject: [PATCH] fix: remove ending slash form test connection url Removes the ending slash when testing openai and ollama api url. --- src/lib/components/AddConnectionModal.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/components/AddConnectionModal.svelte b/src/lib/components/AddConnectionModal.svelte index 8a708d4d2..2104d8f93 100644 --- a/src/lib/components/AddConnectionModal.svelte +++ b/src/lib/components/AddConnectionModal.svelte @@ -49,6 +49,9 @@ let loading = false; const verifyOllamaHandler = async () => { + // remove trailing slash from url + url = url.replace(/\/$/, ''); + const res = await verifyOllamaConnection(localStorage.token, { url, key @@ -62,6 +65,9 @@ }; const verifyOpenAIHandler = async () => { + // remove trailing slash from url + url = url.replace(/\/$/, ''); + const res = await verifyOpenAIConnection( localStorage.token, {