namespace Shaarli\Api\Controllers;
+use Shaarli\Bookmark\BookmarkFilter;
use Slim\Http\Request;
use Slim\Http\Response;
public function getInfo($request, $response)
{
$info = [
- 'global_counter' => count($this->linkDb),
- 'private_counter' => count_private($this->linkDb),
- 'settings' => array(
+ 'global_counter' => $this->bookmarkService->count(),
+ 'private_counter' => $this->bookmarkService->count(BookmarkFilter::$PRIVATE),
+ 'settings' => [
'title' => $this->conf->get('general.title', 'Shaarli'),
'header_link' => $this->conf->get('general.header_link', '?'),
'timezone' => $this->conf->get('general.timezone', 'UTC'),
'enabled_plugins' => $this->conf->get('general.enabled_plugins', []),
'default_private_links' => $this->conf->get('privacy.default_private_links', false),
- ),
+ ],
];
return $response->withJson($info, 200, $this->jsonStyle);