From: Thomas Citharel Date: Wed, 16 Mar 2016 21:43:32 +0000 (+0100) Subject: fix updating entry status through API X-Git-Tag: 2.0.0~22^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0cd0d6eb8c5a7a6ba04f1086b16f9612acbc9b68;p=github%2Fwallabag%2Fwallabag.git fix updating entry status through API --- diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index d0a35013..a590dda1 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php @@ -126,13 +126,9 @@ class WallabagRestController extends FOSRestController $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); } - if (true === (bool) $isStarred) { - $entry->setStarred(true); - } + $entry->setStarred((bool) $isStarred); - if (true === (bool) $isArchived) { - $entry->setArchived(true); - } + $entry->setArchived((bool) $isArchived); $em = $this->getDoctrine()->getManager(); $em->persist($entry);