X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FEntryRestController.php;h=86e723351c696db1bcc09788710499cf2bafb704;hb=f40c88eb1fa349aab600f9c1c94364f317fe62dd;hp=8a2061243a98baeff54644ea84d98ff0ffc8e797;hpb=c18a2476b601bc6b9893462d9be680c2e13c89e8;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 8a206124..86e72335 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -8,6 +8,7 @@ use JMS\Serializer\SerializationContext; use Nelmio\ApiDocBundle\Annotation\ApiDoc; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Wallabag\CoreBundle\Entity\Entry; @@ -180,6 +181,7 @@ class EntryRestController extends WallabagRestController return $this->get('wallabag_core.helper.entries_export') ->setEntries($entry) ->updateTitle('entry') + ->updateAuthor('entry') ->exportAs($request->attributes->get('_format')); } @@ -359,7 +361,7 @@ class EntryRestController extends WallabagRestController } if (null !== $data['isStarred']) { - $entry->setStarred((bool) $data['isStarred']); + $entry->updateStar((bool) $data['isStarred']); } if (!empty($data['tags'])) { @@ -462,7 +464,7 @@ class EntryRestController extends WallabagRestController } if (null !== $data['isStarred']) { - $entry->setStarred((bool) $data['isStarred']); + $entry->updateStar((bool) $data['isStarred']); } if (!empty($data['tags'])) { @@ -750,7 +752,7 @@ class EntryRestController extends WallabagRestController $context = new SerializationContext(); $context->setSerializeNull(true); - $json = $this->get('serializer')->serialize($data, 'json', $context); + $json = $this->get('jms_serializer')->serialize($data, 'json', $context); return (new JsonResponse())->setJson($json); }