based path correction
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user