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
+1 -1
View File
@@ -20,7 +20,7 @@ function Projects() {
useEffect(() => {
const fetchProjects = async () => {
try {
const response = await fetch('/api/shortProjects/');
const response = await fetch('/api/projects/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}
@@ -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) {