From bae6c9da3ca4732b5c7a8d80bcd0bae19c5cf64b Mon Sep 17 00:00:00 2001 From: Echo Date: Tue, 10 Feb 2026 14:04:42 +0000 Subject: [PATCH] fix: correct API paths in habits.html to use /echo/api prefix --- dashboard/habits.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dashboard/habits.html b/dashboard/habits.html index 383a052..7128cb3 100644 --- a/dashboard/habits.html +++ b/dashboard/habits.html @@ -705,7 +705,7 @@ createBtn.textContent = 'Se creează...'; try { - const response = await fetch('/api/habits', { + const response = await fetch('/echo/api/habits', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ name, frequency }) @@ -760,7 +760,7 @@ habitsList.style.display = 'none'; try { - const response = await fetch('/api/habits'); + const response = await fetch('/echo/api/habits'); if (!response.ok) { throw new Error('Failed to fetch habits'); @@ -866,7 +866,7 @@ const originalStreak = streakElement ? streakElement.textContent : '0'; try { - const response = await fetch(`/api/habits/${habitId}/check`, { + const response = await fetch(`/echo/api/habits/${habitId}/check`, { method: 'POST', headers: { 'Content-Type': 'application/json' } }); @@ -941,7 +941,7 @@ deleteBtn.textContent = 'Se șterge...'; try { - const response = await fetch(`/api/habits/${habitToDelete}`, { + const response = await fetch(`/echo/api/habits/${habitToDelete}`, { method: 'DELETE', headers: { 'Content-Type': 'application/json' } });