diff --git a/layouts/auth.vue b/layouts/auth.vue index 16e9552..b3e234e 100644 --- a/layouts/auth.vue +++ b/layouts/auth.vue @@ -1,59 +1,63 @@ \ No newline at end of file diff --git a/pages/login.vue b/pages/login.vue index 1972bea..a66d29f 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -39,11 +39,11 @@ const form = reactive({ const query = useRoute().query as Record; const searchParams = new URLSearchParams(query); -const instanceUrl = useCookie("instance_url").value; const registrationEnabled = ref(true); +const apiBase = useCookie("api_base"); -if (instanceUrl) { - const statsUrl = new URL("/stats", instanceUrl).href; +if (apiBase.value) { + const statsUrl = new URL("/stats", apiBase.value).href; const { status, data } = await useFetch(statsUrl); if (status.value == "success" && data.value) { registrationEnabled.value = data.value.registration_enabled; diff --git a/pages/register.vue b/pages/register.vue index 8c457df..d89eb07 100644 --- a/pages/register.vue +++ b/pages/register.vue @@ -131,8 +131,6 @@ watch(() => form.repeatPassword, (newValue) => { console.log("repeat password change:", newValue); }) -const apiVersion = useRuntimeConfig().public.apiVersion; - async function register(e: Event) { e.preventDefault(); console.log("Sending registration data");