From c28f4969c4d9575a21958eb63d5f47786a04e055 Mon Sep 17 00:00:00 2001 From: lesion Date: Tue, 6 Sep 2022 21:52:27 +0200 Subject: [PATCH] fix limit for mariadb on /api/events #183 --- server/api/controller/event.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/controller/event.js b/server/api/controller/event.js index 8824ce14..e39b40d7 100644 --- a/server/api/controller/event.js +++ b/server/api/controller/event.js @@ -723,8 +723,8 @@ const eventController = { const end = req.query.end const tags = req.query.tags const places = req.query.places - const limit = req.query.max - const page = req.query.page = 0 + const limit = Number(req.query.max) || 0 + const page = Number(req.query.page) || 0 const older = req.query.older || false const show_recurrent = settings.allow_recurrent_event &&