]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix updating entry status through API
authorThomas Citharel <tcit@tcit.fr>
Wed, 16 Mar 2016 21:43:32 +0000 (22:43 +0100)
committerThomas Citharel <tcit@tcit.fr>
Wed, 16 Mar 2016 21:43:32 +0000 (22:43 +0100)
src/Wallabag/ApiBundle/Controller/WallabagRestController.php

index d0a35013850c3794c6582205fd0befc5b1c46620..a590dda1f9479bc1ae13c62d67b49ad12fa14a07 100644 (file)
@@ -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);