From 98c2d70caee036bd08d588c23a06135acfb26d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Sun, 29 Aug 2021 14:19:38 +0200 Subject: [PATCH] Generate random readBy values for each message --- src/routes/uonetplus-uzytkownik.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/uonetplus-uzytkownik.js b/src/routes/uonetplus-uzytkownik.js index d27323e..e0982cf 100644 --- a/src/routes/uonetplus-uzytkownik.js +++ b/src/routes/uonetplus-uzytkownik.js @@ -39,12 +39,12 @@ router.get("/-endpoints", (req, res) => { }); router.get("/Wiadomosc.mvc/GetInboxMessages", (req, res) => { - const recipientsNumber = getRandomInt(60, 100); - const readBy = getRandomInt(20, 60); - const unreadBy = recipientsNumber - readBy; res.json({ "success": true, "data": require("../../data/api/messages/WiadomosciOdebrane").map(item => { + const recipientsNumber = getRandomInt(60, 100); + const readBy = getRandomInt(20, 60); + const unreadBy = recipientsNumber - readBy; return { "Id": item.WiadomoscId * 2, "Nieprzeczytana": !item.GodzinaPrzeczytania,