From b7961446287dbde6d4d837fc9f979331b44fac1f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Wed, 17 Nov 2021 11:18:47 +0100 Subject: [PATCH] chore(composer): update audit library --- app/controllers/api/account.php | 2 +- app/controllers/api/database.php | 2 +- app/controllers/api/users.php | 2 +- composer.json | 2 +- composer.lock | 37 ++++++++++++++++++++------------ 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 8dc221ecb7..5af1bf7a4b 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1251,7 +1251,7 @@ App::get('/v1/account/logs') ; $response->dynamic(new Document([ - 'sum' => $audit->getLogsByUserAndEventsCount($user->getId(), $auditEvents), + 'sum' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents), 'logs' => $output, ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 4095804f8b..df16918fd2 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -542,7 +542,7 @@ App::get('/v1/database/collections/:collectionId/logs') } $response->dynamic(new Document([ - 'sum' => $audit->getLogsByResourceCount($resource), + 'sum' => $audit->countLogsByResource($resource), 'logs' => $output, ]), Response::MODEL_LOG_LIST); }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index d29bef8f04..a398922c9d 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -360,7 +360,7 @@ App::get('/v1/users/:userId/logs') ; $response->dynamic(new Document([ - 'sum' => $audit->getLogsByUserAndEventsCount($user->getId(), $auditEvents), + 'sum' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents), 'logs' => $output, ]), Response::MODEL_LOG_LIST); }); diff --git a/composer.json b/composer.json index 0c0cb95862..4d352d2caf 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "utopia-php/cache": "0.4.*", "utopia-php/cli": "0.11.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.10.*", + "utopia-php/database": "dev-main as 0.10.1", "utopia-php/locale": "0.4.*", "utopia-php/orchestration": "0.2.*", "utopia-php/registry": "0.5.*", diff --git a/composer.lock b/composer.lock index 1601bbab0d..098ddc142c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "14a12f23c3f26ad7650eb3ad912fd078", + "content-hash": "a63c25e2c7daccf59d5337d13c79c8b5", "packages": [ { "name": "adhocore/jwt", @@ -1932,18 +1932,18 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/audit.git", - "reference": "e9a811cf3b7705e75649db8b5f255a12e0388220" + "reference": "4d5f39733557bafe6247a8349656b511563e1b75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/audit/zipball/e9a811cf3b7705e75649db8b5f255a12e0388220", - "reference": "e9a811cf3b7705e75649db8b5f255a12e0388220", + "url": "https://api.github.com/repos/utopia-php/audit/zipball/4d5f39733557bafe6247a8349656b511563e1b75", + "reference": "4d5f39733557bafe6247a8349656b511563e1b75", "shasum": "" }, "require": { "ext-pdo": "*", "php": ">=7.4", - "utopia-php/database": ">=0.6 <1.0" + "utopia-php/database": "dev-main" }, "require-dev": { "phpunit/phpunit": "^9.3", @@ -1977,7 +1977,7 @@ "issues": "https://github.com/utopia-php/audit/issues", "source": "https://github.com/utopia-php/audit/tree/feat-count-methods" }, - "time": "2021-11-16T14:45:05+00:00" + "time": "2021-11-17T10:01:36+00:00" }, { "name": "utopia-php/cache", @@ -2138,16 +2138,16 @@ }, { "name": "utopia-php/database", - "version": "0.10.1", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "9b4697612a2cd1ad55beeb6a02570f6ffe26dc1e" + "reference": "5fc0476d05567d1a156b00e17033f32148c93a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/9b4697612a2cd1ad55beeb6a02570f6ffe26dc1e", - "reference": "9b4697612a2cd1ad55beeb6a02570f6ffe26dc1e", + "url": "https://api.github.com/repos/utopia-php/database/zipball/5fc0476d05567d1a156b00e17033f32148c93a38", + "reference": "5fc0476d05567d1a156b00e17033f32148c93a38", "shasum": "" }, "require": { @@ -2165,6 +2165,7 @@ "utopia-php/cli": "^0.11.0", "vimeo/psalm": "4.0.1" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -2195,9 +2196,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.10.1" + "source": "https://github.com/utopia-php/database/tree/main" }, - "time": "2021-11-02T15:10:39+00:00" + "time": "2021-11-17T09:53:02+00:00" }, { "name": "utopia-php/domains", @@ -6505,10 +6506,18 @@ "time": "2015-12-17T08:42:14+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/database", + "version": "dev-main", + "alias": "0.10.1", + "alias_normalized": "0.10.1.0" + } + ], "minimum-stability": "stable", "stability-flags": { - "utopia-php/audit": 20 + "utopia-php/audit": 20, + "utopia-php/database": 20 }, "prefer-stable": false, "prefer-lowest": false,