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

@@ -2,6 +2,7 @@
import * as z from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'
import urlJoin from "url-join"
import { use_based_path } from '~/composables/based_path'
definePageMeta({
layout: "settings",
@@ -28,7 +29,7 @@
async function submitChanges(event: FormSubmitEvent<Schema>) {
loading_btn.value = true
await fetch(urlJoin(conf.app.baseURL, "/settings/edit_user"), {
await fetch(use_based_path("/settings/edit_user"), {
method: "POST",
headers: {
"Content-Type": "application/json"
@@ -66,7 +67,7 @@
<div class="gap-3 justify-between">
<div class="flex-1 w-full gap-2 mt-5 mb-5">
<UFormField label="First Name" orientation="horizontal" name="first_name">
<UInput v-if="user_data" v-model="user_data.first_name"/>
<UInput v-if="user_data" v-model="user_data.first_name" required/>
<USkeleton v-else class="w-53 h-7" />
</UFormField>
</div>

View File

@@ -5,7 +5,6 @@
definePageMeta({
layout: "settings",
middleware: ["login-required"]
})
const loading_btn = ref(false)
const toast = useToast()
@@ -35,7 +34,7 @@
async function submitChanges(event: FormSubmitEvent<Schema>) {
loading_btn.value = true
try {
fetch(urlJoin(config.app.baseURL,"/settings/changepw"), {
fetch(useBasedPath("/settings/changepw"), {
method: "POST",
headers: {
"Content-Type": "application/json"