]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/api/ApiMiddleware.php
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / application / api / ApiMiddleware.php
index adc8b2666306d185f70fb0668fcefdf2b40b7d13..cc7af18e962427405335f2f8c506934c6129762f 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 namespace Shaarli\Api;
 
 use malkusch\lock\mutex\FlockMutex;
@@ -108,7 +109,8 @@ class ApiMiddleware
      */
     protected function checkToken($request)
     {
-        if (!$request->hasHeader('Authorization')
+        if (
+            !$request->hasHeader('Authorization')
             && !isset($this->container->environment['REDIRECT_HTTP_AUTHORIZATION'])
         ) {
             throw new ApiAuthorizationException('JWT token not provided');
@@ -143,6 +145,7 @@ class ApiMiddleware
     {
         $linkDb = new BookmarkFileService(
             $conf,
+            $this->container->get('pluginManager'),
             $this->container->get('history'),
             new FlockMutex(fopen(SHAARLI_MUTEX_FILE, 'r'), 2),
             true