update fetch url to match new api prefix

This commit is contained in:
2026-06-15 11:24:42 +02:00
parent dfbe3123d5
commit 75d4f5d166
2 changed files with 3 additions and 10 deletions
@@ -8,7 +8,7 @@ function Experiences() {
const [error, setError] = useState(null);
useEffect(() => {
const fetchExperiencesAndTasks = async () => {
const fetchExperiences = async () => {
try {
let response = await fetch('/api/experiences/');
if (!response.ok) {
@@ -16,18 +16,11 @@ function Experiences() {
}
let data = await response.json();
setExperiences(data.data);
response = await fetch('/api/experienceTasks/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}
data = await response.json();
setExperienceTasks(data.data);
} catch (err) {
setError(err.message);
}
};
fetchExperiencesAndTasks();
fetchExperiences();
}, []);
if (error) {