Fix internal board cache keys

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-09-15 08:44:02 +02:00
parent 6ef1c32cf8
commit 2f44532b75

View File

@@ -130,6 +130,7 @@ class BoardService {
return $this->boardsCache;
}
$complete = $this->getUserBoards($since);
$result = [];
/** @var Board $item */
foreach ($complete as &$item) {
$this->boardMapper->mapOwner($item);
@@ -152,7 +153,7 @@ class BoardService {
]);
$result[$item->getId()] = $item;
}
$this->boardsCache = $complete;
$this->boardsCache = $result;
return array_values($result);
}
@@ -189,6 +190,7 @@ class BoardService {
'PERMISSION_SHARE' => $permissions[Acl::PERMISSION_SHARE] ?? false
]);
$this->enrichWithUsers($board);
$this->boardsCache[$board->getId()] = $board;
return $board;
}