Update to use new database abuse adapter

This commit is contained in:
Bradley Schofield
2024-08-16 08:18:57 +00:00
parent 5e5c8007e2
commit 9f52fc4e3b
5 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ use Swoole\Http\Request as SwooleRequest;
use Swoole\Http\Response as SwooleResponse;
use Swoole\Http\Server;
use Swoole\Process;
use Utopia\Abuse\Adapters\TimeLimit;
use Utopia\Abuse\Adapters\Database as AbuseDatabase;
use Utopia\App;
use Utopia\Audit\Audit;
use Utopia\CLI\Console;
@@ -101,8 +101,8 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
$audit->setup();
}
if ($dbForConsole->getCollection(TimeLimit::COLLECTION)->isEmpty()) {
$adapter = new TimeLimit("", 0, 1, $dbForConsole);
if ($dbForConsole->getCollection(AbuseDatabase::COLLECTION)->isEmpty()) {
$adapter = new AbuseDatabase("", 0, 1, $dbForConsole);
$adapter->setup();
}