refactor: use relative path for API messages endpoint

This commit is contained in:
Van Leemput Dayron
2025-12-15 19:22:11 +01:00
parent 5dec349259
commit 7e2672c262

View File

@@ -27,7 +27,7 @@ const EraseData = () => {
try {
// Using absolute URL for localhost dev, in prod simple /api might work if proxied or configured
// Assuming localhost:3000 for backend based on previous steps
await axios.post('http://localhost:4000/api/messages', {
await axios.post('/api/messages', {
nom: formData.nom,
prenom: formData.prenom,
email: formData.email,