aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-03-15 18:50:13 +0100
committerThomas Citharel <tcit@tcit.fr>2016-03-16 22:22:12 +0100
commit0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78 (patch)
tree2d33ffeba77ae33b6be24cda60eaf7007a53c96c /src/Wallabag
parent3500d4099f88f7db22eba42fdb7e8926f1f1cdac (diff)
downloadwallabag-0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78.tar.gz
wallabag-0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78.tar.zst
wallabag-0d3043a29c4aba541d6a18c2d5cc7ebffc6ddc78.zip
fix api properties and typo
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php4
-rw-r--r--src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php4
-rw-r--r--src/Wallabag/CoreBundle/Controller/DeveloperController.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 2633a311..3265ba38 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -126,11 +126,11 @@ class WallabagRestController extends FOSRestController
126 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); 126 $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags);
127 } 127 }
128 128
129 if (true === (bool) $isStarred) { 129 if ($isStarred === 'true') {
130 $entry->setStarred(true); 130 $entry->setStarred(true);
131 } 131 }
132 132
133 if (true === (bool) $isArchived) { 133 if ($isArchived === 'true') {
134 $entry->setArchived(true); 134 $entry->setArchived(true);
135 } 135 }
136 136
diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
index 2e78d8b2..f5a9748c 100644
--- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -188,8 +188,8 @@ class WallabagRestControllerTest extends WallabagApiTestCase
188 { 188 {
189 $this->client->request('POST', '/api/entries.json', array( 189 $this->client->request('POST', '/api/entries.json', array(
190 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', 190 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html',
191 'archive' => true, 191 'archive' => 'true',
192 'starred' => true, 192 'starred' => 'true',
193 )); 193 ));
194 194
195 $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); 195 $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
diff --git a/src/Wallabag/CoreBundle/Controller/DeveloperController.php b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
index f519bdbc..e5cfd83c 100644
--- a/src/Wallabag/CoreBundle/Controller/DeveloperController.php
+++ b/src/Wallabag/CoreBundle/Controller/DeveloperController.php
@@ -43,7 +43,7 @@ class DeveloperController extends Controller
43 $clientForm->handleRequest($request); 43 $clientForm->handleRequest($request);
44 44
45 if ($clientForm->isValid()) { 45 if ($clientForm->isValid()) {
46 $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password','refresh_token')); 46 $client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token'));
47 $em->persist($client); 47 $em->persist($client);
48 $em->flush(); 48 $em->flush();
49 49