urls corrected on fetch

This commit is contained in:
2026-01-20 22:25:00 +00:00
parent c9189c4ef1
commit 2577dc46ee
4 changed files with 21 additions and 8 deletions

View File

@@ -8,7 +8,9 @@
})
const loading_btn = ref(false)
const toast = useToast()
const config = useRuntimeConfig()
const base_url = config.app.baseURL.endsWith('/') ? config.app.baseURL.slice(0, -1) : config.app.baseURL
const schema = z.object({
old_pw: z.string(),
@@ -32,7 +34,7 @@
async function submitChanges(event: FormSubmitEvent<Schema>) {
loading_btn.value = true
try {
fetch("/settings/changepw", {
fetch(base_url + "/settings/changepw", {
method: "POST",
headers: {
"Content-Type": "application/json"