]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/EntryRestController.php
Merge pull request #4152 from ldidry/add-env-var-dev.sh
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryRestController.php
index bdd02129a3b568cce34b870896db0ac4a921de23..c09fdaebb5c6af02e154cea956db941ec5bb25b6 100644 (file)
@@ -365,9 +365,7 @@ class EntryRestController extends WallabagRestController
                     'language' => !empty($data['language']) ? $data['language'] : $entry->getLanguage(),
                     'date' => !empty($data['publishedAt']) ? $data['publishedAt'] : $entry->getPublishedAt(),
                     // faking the open graph preview picture
-                    'open_graph' => [
-                        'og_image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(),
-                    ],
+                    'image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(),
                     'authors' => \is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(),
                 ]
             );
@@ -566,7 +564,7 @@ class EntryRestController extends WallabagRestController
         }
 
         // if refreshing entry failed, don't save it
-        if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
+        if ($this->container->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
             return new JsonResponse([], 304);
         }
 
@@ -824,8 +822,6 @@ class EntryRestController extends WallabagRestController
      * Retrieve value from the request.
      * Used for POST & PATCH on a an entry.
      *
-     * @param Request $request
-     *
      * @return array
      */
     private function retrieveValueFromRequest(Request $request)