Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix ql
  • Loading branch information
abnegate committed Jun 10, 2025
commit 1c685bb8f8d65ddefa827951116cd44ef87978c1
4 changes: 2 additions & 2 deletions src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -5141,7 +5141,7 @@ public function increaseDocumentAttribute(
$document = Authorization::skip(fn () => $this->silent(fn () => $this->getDocument($collection->getId(), $id, forUpdate: true))); // Skip ensures user does not need read permission for this

if ($document->isEmpty()) {
return false;
throw new NotFoundException('Document not found');
}

$validator = new Authorization(self::PERMISSION_UPDATE);
Expand Down Expand Up @@ -5237,7 +5237,7 @@ public function decreaseDocumentAttribute(
$document = Authorization::skip(fn () => $this->silent(fn () => $this->getDocument($collection->getId(), $id, forUpdate: true))); // Skip ensures user does not need read permission for this

if ($document->isEmpty()) {
return false;
throw new NotFoundException('Document not found');
}

$validator = new Authorization(self::PERMISSION_UPDATE);
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Mirror.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,12 +948,12 @@ public function renameIndex(string $collection, string $old, string $new): bool
return $this->delegate(__FUNCTION__, \func_get_args());
}

public function increaseDocumentAttribute(string $collection, string $id, string $attribute, int|float $value = 1, int|float|null $max = null): bool
public function increaseDocumentAttribute(string $collection, string $id, string $attribute, int|float $value = 1, int|float|null $max = null): int|float
{
return $this->delegate(__FUNCTION__, \func_get_args());
}

public function decreaseDocumentAttribute(string $collection, string $id, string $attribute, int|float $value = 1, int|float|null $min = null): bool
public function decreaseDocumentAttribute(string $collection, string $id, string $attribute, int|float $value = 1, int|float|null $min = null): int|float
{
return $this->delegate(__FUNCTION__, \func_get_args());
}
Expand Down