From 5583f242ece05ee905aa10d336a8c1c749bbbf6c Mon Sep 17 00:00:00 2001 From: guidezSeb Date: Wed, 17 Feb 2021 19:47:38 +0100 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=92=A1=20comment=20code=20+=20little?= =?UTF-8?q?=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1c7eff6..b4ca4ad 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const app = fastify({ logger: true }); - +//REQUETE CHAT const promise1 = new Promise((resolve => { axios.get("https://cat-fact.herokuapp.com/facts/random?animal_type=cat&amount=3") .then((response) => { @@ -18,6 +18,7 @@ const promise1 = new Promise((resolve => { }) })).catch(error => resolve(null)); +//REQUETE RENARD const promise2 = new Promise((resolve => { axios.get("https://randomfox.ca/floof/") .then((response) => { @@ -25,6 +26,7 @@ const promise2 = new Promise((resolve => { }) })).catch(error => resolve(null)); +//REQUETE VACANCES const promise3 = (countryCode) => { return new Promise((resolve) => { @@ -34,7 +36,7 @@ return new Promise((resolve) => { }).catch(error => resolve(null)); }) } - +//AFFICHAGE const fetchAsyncData = async (countryCode) => { const waitp1 = await promise1; const waitp2 = await promise2;