changed static paths to relative api paths so useable without cors

This commit is contained in:
2025-10-23 15:38:17 +02:00
parent e82e584f76
commit f5aa376e31
3 changed files with 14 additions and 14 deletions

View File

@@ -2,6 +2,8 @@
import React, { useState } from 'react';
import { useAuth } from '../../contexts/AuthContext';
const API_BASE_URL = '/api';
const Setup: React.FC = () => {
const [step, setStep] = useState(1);
const [formData, setFormData] = useState({
@@ -73,7 +75,7 @@ const Setup: React.FC = () => {
console.log('🚀 Sending setup request...', payload);
const response = await fetch('http://localhost:3002/api/setup/admin', {
const response = await fetch(`${API_BASE_URL}/setup/admin`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',