Skip to content

Commit

Permalink
feat(BookmarkController#countBookmarks): Fix root folder count
Browse files Browse the repository at this point in the history
used to be unique bookmarks including bookmarks in trashbin
now it's the same as normal folder counts: every item is counted

fixes #2202

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Aug 5, 2024
1 parent 5c01d1f commit 1a22935
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/Controller/BookmarkController.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,11 +775,6 @@ public function countBookmarks(int $folder): JSONResponse {
return $res;
}

if ($folder === -1 && $this->authorizer->getUserId() !== null) {
$count = $this->bookmarkMapper->countBookmarksOfUser($this->authorizer->getUserId());
return new JSONResponse(['status' => 'success', 'item' => $count]);
}

$folder = $this->toInternalFolderId($folder);
if ($folder === null) {
$res = new JSONResponse(['status' => 'error', 'data' => ['Not found']], Http::STATUS_NOT_FOUND);
Expand Down

0 comments on commit 1a22935

Please sign in to comment.