mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-05 01:24:38 +08:00
Fixed api query total not taking filters into account
This commit is contained in:
@ -36,6 +36,8 @@ class ListingResponseBuilder
|
||||
*/
|
||||
public function toResponse()
|
||||
{
|
||||
$this->applyFiltering($this->query);
|
||||
|
||||
$total = $this->query->count();
|
||||
$data = $this->fetchData();
|
||||
|
||||
@ -52,7 +54,6 @@ class ListingResponseBuilder
|
||||
{
|
||||
$this->applyCountAndOffset($this->query);
|
||||
$this->applySorting($this->query);
|
||||
$this->applyFiltering($this->query);
|
||||
|
||||
return $this->query->get($this->fields);
|
||||
}
|
||||
|
Reference in New Issue
Block a user