From 06d22f910c8440beca129354cc0fe29cf4057bc2 Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 23 Feb 2025 20:51:38 +0200 Subject: [PATCH 1/2] disable logs display --- app/controllers/api/account.php | 6 ++++-- app/controllers/api/databases.php | 18 ++++++++++++------ app/controllers/api/messaging.php | 24 ++++++++++++++++-------- app/controllers/api/teams.php | 6 ++++-- app/controllers/api/users.php | 6 ++++-- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 21a04800b5..bef26ad25c 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2750,8 +2750,10 @@ App::get('/v1/account/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByUser($user->getInternalId()), - 'logs' => $output, + //'total' => $audit->countLogsByUser($user->getInternalId()), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index c563d1e8e0..3859132fd6 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -723,8 +723,10 @@ App::get('/v1/databases/:databaseId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); @@ -1112,8 +1114,10 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); @@ -3763,8 +3767,10 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents/:documen } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index d7d3750ccf..06d49394aa 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -1047,8 +1047,10 @@ App::get('/v1/messaging/providers/:providerId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); @@ -2276,8 +2278,10 @@ App::get('/v1/messaging/topics/:topicId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); @@ -2686,8 +2690,10 @@ App::get('/v1/messaging/subscribers/:subscriberId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); @@ -3451,8 +3457,10 @@ App::get('/v1/messaging/messages/:messageId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 763aca64f0..7a9f21d74b 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -1415,7 +1415,9 @@ App::get('/v1/teams/:teamId/logs') } } $response->dynamic(new Document([ - 'total' => $audit->countLogsByResource($resource), - 'logs' => $output, + //'total' => $audit->countLogsByResource($resource), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 962022927f..ca3f042ba4 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -915,8 +915,10 @@ App::get('/v1/users/:userId/logs') } $response->dynamic(new Document([ - 'total' => $audit->countLogsByUser($user->getInternalId()), - 'logs' => $output, + //'total' => $audit->countLogsByUser($user->getInternalId()), + //'logs' => $output, + 'total' => 0, + 'logs' => [], ]), Response::MODEL_LOG_LIST); }); From 6bd14d548fbe36b7018a536b024c8eb20ca58fbb Mon Sep 17 00:00:00 2001 From: shimon Date: Sun, 23 Feb 2025 20:58:02 +0200 Subject: [PATCH 2/2] composer --- app/controllers/api/databases.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 3859132fd6..d9d62eac51 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1115,7 +1115,7 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/logs') $response->dynamic(new Document([ //'total' => $audit->countLogsByResource($resource), - //'logs' => $output, + //'logs' => $output, 'total' => 0, 'logs' => [], ]), Response::MODEL_LOG_LIST);