From 16610a568d0f72323dbe548f08b216cd228b9918 Mon Sep 17 00:00:00 2001 From: Boyer laurent <154669613+LaurentBoyer1976@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:57:36 +0100 Subject: [PATCH] test api chemin git hub pages --- scripts/pages/index.js | 2 +- scripts/pages/photographer.js | 2 +- scripts/patterns/constructorPattern/photographeData.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pages/index.js b/scripts/pages/index.js index 1114b053c76..5e033e33905 100644 --- a/scripts/pages/index.js +++ b/scripts/pages/index.js @@ -3,7 +3,7 @@ import PhotographeData from "../patterns/constructorPattern/photographeData.js"; import CardFactory from "../patterns/factoriesPattern/cardsFactory.js"; import { singletonMedia } from "../patterns/singletonPattern/SingletonMedia.js"; const photographersSection = document.querySelector(".photographer") -const photographerApi = new Api("../../data/photographers.json"); +const photographerApi = new Api("/Front-End-Fisheye.github.io/data/photographers.json"); /** * @description - Initialise la page d'accueil * @param {Array} photographersData - Tableau des photographes diff --git a/scripts/pages/photographer.js b/scripts/pages/photographer.js index 9c3c85fe3bf..a61822a5115 100644 --- a/scripts/pages/photographer.js +++ b/scripts/pages/photographer.js @@ -8,7 +8,7 @@ import {openCloseFilterMenu, displayMediaWithFilter} from "../utils/filter.js"; import {afficheTotalLikes} from "../utils/likes.js"; import {displayLightbox} from "../utils/lightbox.js"; -const photographersApi = new Api("../../data/photographers.json"); +const photographersApi = new Api("/Front-End-Fisheye.github.io/data/photographers.json"); const photographerId = new URLSearchParams(window.location.search).get("id"); /** * @description - Récupère les données du photographe et des médias diff --git a/scripts/patterns/constructorPattern/photographeData.js b/scripts/patterns/constructorPattern/photographeData.js index 787e5a11531..29a1e964859 100644 --- a/scripts/patterns/constructorPattern/photographeData.js +++ b/scripts/patterns/constructorPattern/photographeData.js @@ -24,7 +24,7 @@ export default class PhotographeData { * @returns */ formatPortraitPath(portrait){ - return `./assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/${portrait}`; + return `/Front-End-Fisheye.github.io/assets/images/FishEye_Photos/Sample_Photos/Photographers ID Photos/${portrait}`; } }