From ce76f953dc4b7ef2f054bc04e50bcd368e063107 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 21 Jun 2025 21:43:01 -0400 Subject: [PATCH] Use limit if it is specified --- web/api/app/Controller/EventsController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 935c7d6d8..4a0dfc04c 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -82,9 +82,15 @@ class EventsController extends AppController { // TODO: Implement request based limits. # 'limit' => '100', + + 'order' => array('StartDateTime'), 'paramType' => 'querystring', ); + if ($this->request->query('limit')) { + $settings['limit'] = $this->request->query('limit'); + } + if ( isset($conditions['GroupId']) ) { $settings['joins'] = array( array(