From 25a1df6454ffa9eed99858effde41f5b5c1fc42a Mon Sep 17 00:00:00 2001 From: Anatoly Date: Mon, 18 Oct 2021 21:27:19 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=D0=98=D1=81=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83=20?= =?UTF-8?q?=D1=81=20=D1=82=D0=B8=D0=BF=D0=BE=D0=BC=20=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/index.js b/backend/index.js index 49ac984..50fb29a 100644 --- a/backend/index.js +++ b/backend/index.js @@ -118,7 +118,7 @@ app.get('/card', async (req, res) => { }) app.get('/meme', async (req, res) => { - const amount = req.query.amount || 1 + const amount = Number(req.query.amount) || 1 try { let cards = await cardsCollection.aggregate([{ $sample: { size: amount } }]).toArray() // Удаляем конфиденциальную информацию