Fix connection

This commit is contained in:
Orionis312050 committed 2026-04-16 18:23:16 +02:00
1 parent 4ad665cac0
commit b8a847c210
12 files changed
+56 -18

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ export default function SettingsModal({ onClose }: { onClose: () => void }) {
const [saved, setSaved] = useState(false);
useEffect(() => {
fetch('http://localhost:3001/api/settings', {
fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3001'}/api/settings`, {
credentials: 'include'
})
.then(res => res.json())
@@ -33,7 +33,7 @@ export default function SettingsModal({ onClose }: { onClose: () => void }) {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
try {
await fetch('http://localhost:3001/api/settings', {
await fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3001'}/api/settings`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'