From ffa06e7de45245a38dd37f542192fd0fa7981b37 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Wed, 9 Jun 2021 15:13:12 +0545 Subject: [PATCH] abuse audit setup for ocnsole db --- app/http.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/http.php b/app/http.php index 0856a69f9..b4f70e190 100644 --- a/app/http.php +++ b/app/http.php @@ -14,6 +14,8 @@ use Utopia\App; use Utopia\CLI\Console; use Utopia\Config\Config; use Utopia\Database\Validator\Authorization as Authorization2; +use Utopia\Audit\Audit; +use Utopia\Abuse\Adapters\TimeLimit; // xdebug_start_trace('/tmp/trace'); @@ -67,6 +69,12 @@ $http->on('start', function (Server $http) use ($payloadSize, $register) { $register->get('cache')->flushAll(); $dbForConsole->create(); + + $audit = new Audit($dbForConsole); + $audit->setup(); + + $adapter = new TimeLimit("", 0, 1, $dbForConsole); + $adapter->setup(); foreach ($collections as $key => $collection) { $dbForConsole->createCollection($key);