Version con fallas

This commit is contained in:
2026-02-12 14:00:04 -07:00
parent 96cd09476c
commit 2033a35a2b
44 changed files with 196 additions and 3723 deletions

View File

@@ -4,9 +4,6 @@
import { toast } from '$lib/stores/toast.js';
import { onMount } from 'svelte';
// API Configuration
const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:8000';
let currentPassword = '';
let newPassword = '';
let confirmPassword = '';
@@ -85,7 +82,7 @@
return;
}
const response = await fetch(`${API_URL}/v1/client-profile/`, {
const response = await fetch('/api/v1/client-profile/', {
headers: {
Authorization: `Bearer ${$auth.token}`,
'X-Tenant-ID': $auth.user.tenant_id
@@ -188,7 +185,7 @@
isUpdatingProfile = true;
try {
const response = await fetch(`${API_URL}/v1/auth/profile`, {
const response = await fetch('/api/v1/auth/profile', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json',
@@ -221,7 +218,7 @@
isChangingPassword = true;
try {
const response = await fetch(`${API_URL}/v1/auth/change-password`, {
const response = await fetch('/api/v1/auth/change-password', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -272,7 +269,7 @@
profileData.credit_limit = parseFloat(profileData.credit_limit);
}
const response = await fetch(`${API_URL}/v1/client-profile/`, {
const response = await fetch('/api/v1/client-profile/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',