From 0556f8fdca3a73eb9eb7040d019b8279ca85faad Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 8 Aug 2025 16:06:19 +0530 Subject: [PATCH] update: readability. --- .../Http/Databases/Collections/Logs/XList.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php index 3a4de7e03c..1341edd1a9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Logs/XList.php @@ -103,8 +103,16 @@ class XList extends Action ]); $audit = new Audit($dbForProject); - $prefix = $this->getContext() === TABLES ? 'grid/' : ''; - $resource = "database/$databaseId/$prefix{$this->getContext()}/$collectionId"; + + $context = $this->getContext(); + $isTables = $context === TABLES; + + if (!$isTables) { + $resource = "database/$databaseId/$context/$collectionId"; + } else { + $resource = "database/$databaseId/grid/$context/$collectionId"; + } + $logs = $audit->getLogsByResource($resource, $queries); $output = [];