fix: apiBase not including api version
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

This commit is contained in:
SauceyRed 2025-05-31 02:55:44 +02:00
parent 76cede3d67
commit 57f31d487e
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7

View file

@ -56,6 +56,7 @@ const instanceUrl = ref<string | null | undefined>(null);
const instanceUrlInput = ref<string>();
const instanceError = ref<string>();
const requestUrl = useRequestURL();
const apiVersion = useRuntimeConfig().public.apiVersion;
const apiBase = useCookie("api_base");
const gorbTxtError = ref<string>("");
@ -92,7 +93,7 @@ async function selectInstance(e: Event) {
const parsed = parseWellKnown(res._data as string);
console.log("parsed:", parsed);
if (parsed.ApiBaseUrl) {
apiBase.value = parsed.ApiBaseUrl;
apiBase.value = `${parsed.ApiBaseUrl}/v${apiVersion}`;
console.log("set apiBase to:", parsed.ApiBaseUrl);
const origin = new URL(res.url).origin;
instanceUrl.value = origin;