Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions app/controllers/api/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -2985,12 +2985,6 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new EventAudit($dbForProject);

$logs = $audit->getLogsByUser($user->getSequence(), $queries);
Expand Down
24 changes: 0 additions & 24 deletions app/controllers/api/messaging.php
Original file line number Diff line number Diff line change
Expand Up @@ -1155,12 +1155,6 @@
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'provider/' . $providerId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down Expand Up @@ -2562,12 +2556,6 @@
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'topic/' . $topicId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down Expand Up @@ -2985,12 +2973,6 @@
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'subscriber/' . $subscriberId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down Expand Up @@ -3785,12 +3767,6 @@
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'message/' . $messageId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down
6 changes: 0 additions & 6 deletions app/controllers/api/teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -1479,12 +1479,6 @@
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'team/' . $team->getId();
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down
6 changes: 1 addition & 5 deletions app/controllers/api/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -957,11 +957,7 @@ function createUser(Hash $hash, string $userId, ?string $email, ?string $passwor
} catch (QueryException $e) {
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}
// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$logs = $audit->getLogsByUser($user->getSequence(), $queries);
$output = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use MaxMind\Db\Reader;
use Utopia\Audit\Audit;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Query;
Expand Down Expand Up @@ -99,12 +98,6 @@ public function action(string $databaseId, string $collectionId, string $documen
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$type = $this->getCollectionsEventsContext();
$context = $this->getContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use MaxMind\Db\Reader;
use Utopia\Audit\Audit;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Query;
Expand Down Expand Up @@ -96,12 +95,6 @@ public function action(string $databaseId, string $collectionId, array $queries,
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$context = $this->getContext();
$resource = "database/$databaseId/$context/$collectionId";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use MaxMind\Db\Reader;
use Utopia\Audit\Audit;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Helpers\ID;
Expand Down Expand Up @@ -85,12 +84,6 @@ public function action(string $databaseId, array $queries, UtopiaResponse $respo
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'database/' . $databaseId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use MaxMind\Db\Reader;
use Utopia\Audit\Audit;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Helpers\ID;
Expand Down Expand Up @@ -80,12 +79,6 @@ public function action(string $databaseId, array $queries, UtopiaResponse $respo
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
}

// Temp fix for logs
$queries[] = Query::or([
Query::greaterThan('$createdAt', DateTime::format(new \DateTime('2025-02-26T01:30+00:00'))),
Query::lessThan('$createdAt', DateTime::format(new \DateTime('2025-02-13T00:00+00:00'))),
]);

$audit = new Audit($dbForProject);
$resource = 'database/' . $databaseId;
$logs = $audit->getLogsByResource($resource, $queries);
Expand Down