apply date search filter in SQL queries instead of computing it in php

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
This commit is contained in:
Julien Veyssier
2021-10-04 16:19:45 +02:00
parent ce595bdd9d
commit ca04efb736
3 changed files with 37 additions and 18 deletions

View File

@@ -118,8 +118,8 @@ class BoardService {
/**
* Get all boards that are shared with a user, their groups or circles
*/
public function getUserBoards(int $since = -1, bool $includeArchived = true): array {
return $this->boardMapper->findAllForUser($this->userId, $since, $includeArchived);
public function getUserBoards(int $since = -1, bool $includeArchived = true, ?int $before = null): array {
return $this->boardMapper->findAllForUser($this->userId, $since, $includeArchived, $before);
}
/**