]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix api properties and typo
authorThomas Citharel <tcit@tcit.fr>
Tue, 15 Mar 2016 17:50:13 +0000 (18:50 +0100)
committerThomas Citharel <tcit@tcit.fr>
Wed, 16 Mar 2016 21:22:12 +0000 (22:22 +0100)
src/Wallabag/ApiBundle/Controller/WallabagRestController.php
src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
src/Wallabag/CoreBundle/Controller/DeveloperController.php

index 2633a311773a629a96ea37f734c15d1e2fcc502b..3265ba3876037292eac04123b2b92e8e4b212046 100644 (file)
@@ -126,11 +126,11 @@ class WallabagRestController extends FOSRestController
             $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
         }
 
-        if (true === (bool) $isStarred) {
+        if ($isStarred === 'true') {
             $entry->setStarred(true);
         }
 
-        if (true === (bool) $isArchived) {
+        if ($isArchived  === 'true') {
             $entry->setArchived(true);
         }
 
index 2e78d8b2ca9bc6b06879082f11e118649f102d5a..f5a9748ca1a988b36bd3faf3c10e952cc9961642 100644 (file)
@@ -188,8 +188,8 @@ class WallabagRestControllerTest extends WallabagApiTestCase
     {
         $this->client->request('POST', '/api/entries.json', array(
             'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html',
-            'archive' => true,
-            'starred' => true,
+            'archive' => 'true',
+            'starred' => 'true',
         ));
 
         $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
index f519bdbcc21ac87ce4bc9b3c3750714532a7cf99..e5cfd83c656b67209d3f78d87ae3b5d56543729f 100644 (file)
@@ -43,7 +43,7 @@ class DeveloperController extends Controller
         $clientForm->handleRequest($request);
 
         if ($clientForm->isValid()) {
-            $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password','refresh_token'));
+            $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token'));
             $em->persist($client);
             $em->flush();