X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FEntryRestController.php;h=86e723351c696db1bcc09788710499cf2bafb704;hb=d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862;hp=9277e1a19f093837efbb34540bc0996b02d32bc0;hpb=f39152ad6e62f1ea43f501e88a8839526d77ef6c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index 9277e1a1..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; @@ -360,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'])) { @@ -463,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'])) { @@ -751,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); }