mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-11-30 22:45:46 +01:00
changed static paths to relative api paths so useable without cors
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user