fix: apiBase not including api version
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
76cede3d67
commit
57f31d487e
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue