571 // console.log("%c🛡️ Interception de requêtes facettes vides", "color: orange; font-weight: bold;");
572
573 // Simuler une réponse sans appel API
574 return Promise.resolve({
575 results: requests.map(req => {
1117 authorizedVehicles = await waitForAuthorizedVehicles();
1118
1119 // Précharger toutes les facettes en UNE SEULE requête API
1120 await preloadAllFacetsOnce();
1121
31function getAuthorizedPoints() {
32 console.log("Début getAuthorizedPoints - authorizedVehicles:", authorizedVehicles);
33 fetch("https://xnyx-ex15-ndvx.n7.xano.io/api:_aqWQ_f_/cached_mapCompanies", {
34 method: "POST",
35 headers: {
39 })
40 .then(response => {
41 console.log("Réponse API reçue:", response.status);
42 return response.json();
43 })
85
86const loadEmoji = (code) => {
87 // const api = `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/${code.toLowerCase()}.svg`
88 const api = `https://cdn.jsdelivr.net/gh/shuding/fluentui-emoji-unicode/assets/${code.toLowerCase()}_color.svg`
89 return fetch(api).then((r) => r.text())
90}
91
11// Initialize Notion client
12export const notion = new Client({
13 auth: Deno.env.get("NOTION_API_KEY"),
14});
15
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
13 console.log(page.id);
14 // get the cobrowse value from the payload
15 // warning: properties in Notion are capitalized as a convention (see Cobrowse)
16 const cobrowse = (page.properties.Cobrowse.checkbox) ? false : true;
17 // save new cobrowse boolean to Notion page
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7
3// Initialize Notion client
4const notion = new Client({
5 auth: Deno.env.get("NOTION_API_KEY"),
6});
7