based path correction

This commit is contained in:
2026-01-21 20:48:45 +00:00
parent 3eeaa797ad
commit 4338f347c5
5 changed files with 10 additions and 12 deletions

View File

@@ -1,12 +1,11 @@
<script setup lang="ts">
import * as z from 'zod'
import type { FormSubmitEvent, AuthFormField } from '@nuxt/ui'
import urlJoin from 'url-join'
const toast = useToast()
const config = useRuntimeConfig()
const base_url = config.app.baseURL.endsWith('/') ? config.app.baseURL.slice(0, -1) : config.app.baseURL
const wrong_login = ref(false)
const fields: AuthFormField[] = [{
@@ -47,7 +46,7 @@ function onSubmit(payload: FormSubmitEvent<Schema>) {
remember: payload.data.remember || false
}
}).then((r) => {
reloadNuxtApp({path: "/"});
navigateTo(useBasedPath("/"), { external: true})
}).catch((err) => {
if(err.data.statusCode == 401) {
wrong_login.value = true;