diff --git a/public/site/blueprints/files/inspiration.yml b/public/site/blueprints/files/inspiration.yml index a22dcf1..72df070 100644 --- a/public/site/blueprints/files/inspiration.yml +++ b/public/site/blueprints/files/inspiration.yml @@ -5,8 +5,7 @@ accept: type: image fields: - favoriteForClients: + favoriteForUsers: label: | - Dans les favoris des clients : - type: pages - query: page('clients').children + Dans les favoris des utilisateurs : + type: users diff --git a/src/stores/api.js b/src/stores/api.js index c073916..8d34664 100644 --- a/src/stores/api.js +++ b/src/stores/api.js @@ -32,8 +32,9 @@ export const useApiStore = defineStore("api", () => { */ async function fetchPageData(path = window.location.pathname) { const isHomePage = path === "/"; - path = isHomePage ? "/home" : path; + path = path === "/" ? "/home" : path; path = path.startsWith("/") ? path : "/" + path; + path = path.endsWith("/") ? path.substring(0, path.length - 1) : path; const url = `${window.location.origin}${path}.json`;