From e748b7af759c984b1386dca1173222ac02e8d81d Mon Sep 17 00:00:00 2001 From: Jepp9350 <2jepp9350@gmail.com> Date: Fri, 20 Dec 2024 12:20:42 +0100 Subject: [PATCH] Cleaned up --- routes/bookingsRoute.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routes/bookingsRoute.php b/routes/bookingsRoute.php index 534f603d..322ce22b 100644 --- a/routes/bookingsRoute.php +++ b/routes/bookingsRoute.php @@ -3,6 +3,7 @@ namespace routes; use classes\authentication; +use classes\response; use objects\bookings_o; use objects\logs_o; use traits\route_t; @@ -16,7 +17,8 @@ class bookingsRoute /** All bookings */ $this->get('/bookings', function () { // Require the user to be logged in - global $response; + global /** @var response $response */ + $response; $this->requirePermission('list_bookings'); // Get the user object $user = (new authentication())->get_user(); @@ -24,7 +26,7 @@ class bookingsRoute if ($user) { // Log the incident (new logs_o())->add('bookings', 'global', 1, $user->id, 'LIST_BOOKINGS', 'Successfully listed bookings'); - // Return the list of departments + // Return the list of bookings $response->success( (new bookings_o())->listObjectsWithPaginationIfSet() );