From ae6ebc2441e1a6669e9d4afe09e9c506527a9756 Mon Sep 17 00:00:00 2001 From: HF Date: Thu, 8 Sep 2022 22:45:28 +0200 Subject: [PATCH] change chathistory limit to not fall to sql requests --- src/routes/api/chathistory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/chathistory.js b/src/routes/api/chathistory.js index 37897f4..3f526aa 100644 --- a/src/routes/api/chathistory.js +++ b/src/routes/api/chathistory.js @@ -23,7 +23,7 @@ async function chatHistory(req, res) { cid = parseInt(cid, 10); limit = parseInt(limit, 10); if (Number.isNaN(cid) || Number.isNaN(limit) - || limit <= 0 || limit > 300) { + || limit <= 0 || limit > 200) { res.status(400); res.json({ errors: ['cid or limit not a valid value'],