diff options
Diffstat (limited to 'application/api/ApiMiddleware.php')
-rw-r--r-- | application/api/ApiMiddleware.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/application/api/ApiMiddleware.php b/application/api/ApiMiddleware.php index 2d55bda6..4745ac94 100644 --- a/application/api/ApiMiddleware.php +++ b/application/api/ApiMiddleware.php | |||
@@ -3,6 +3,7 @@ namespace Shaarli\Api; | |||
3 | 3 | ||
4 | use Shaarli\Api\Exceptions\ApiAuthorizationException; | 4 | use Shaarli\Api\Exceptions\ApiAuthorizationException; |
5 | use Shaarli\Api\Exceptions\ApiException; | 5 | use Shaarli\Api\Exceptions\ApiException; |
6 | use Shaarli\Bookmark\BookmarkFileService; | ||
6 | use Shaarli\Config\ConfigManager; | 7 | use Shaarli\Config\ConfigManager; |
7 | use Slim\Container; | 8 | use Slim\Container; |
8 | use Slim\Http\Request; | 9 | use Slim\Http\Request; |
@@ -117,7 +118,7 @@ class ApiMiddleware | |||
117 | } | 118 | } |
118 | 119 | ||
119 | /** | 120 | /** |
120 | * Instantiate a new LinkDB including private links, | 121 | * Instantiate a new LinkDB including private bookmarks, |
121 | * and load in the Slim container. | 122 | * and load in the Slim container. |
122 | * | 123 | * |
123 | * FIXME! LinkDB could use a refactoring to avoid this trick. | 124 | * FIXME! LinkDB could use a refactoring to avoid this trick. |
@@ -126,10 +127,10 @@ class ApiMiddleware | |||
126 | */ | 127 | */ |
127 | protected function setLinkDb($conf) | 128 | protected function setLinkDb($conf) |
128 | { | 129 | { |
129 | $linkDb = new \Shaarli\Bookmark\LinkDB( | 130 | $linkDb = new BookmarkFileService( |
130 | $conf->get('resource.datastore'), | 131 | $conf, |
131 | true, | 132 | $this->container->get('history'), |
132 | $conf->get('privacy.hide_public_links') | 133 | true |
133 | ); | 134 | ); |
134 | $this->container['db'] = $linkDb; | 135 | $this->container['db'] = $linkDb; |
135 | } | 136 | } |