diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-02-27 17:51:36 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-03-06 21:09:15 +0100 |
commit | db2b4bf678c4c9e778ed0b817df182c9ee06520f (patch) | |
tree | 1394ad142d01e820edb01e8bf5b219b8b4dfd2db /src/Wallabag/CoreBundle/Controller | |
parent | b0cce9e6369b0b821c01163a0e4df5552f9924f6 (diff) | |
download | wallabag-db2b4bf678c4c9e778ed0b817df182c9ee06520f.tar.gz wallabag-db2b4bf678c4c9e778ed0b817df182c9ee06520f.tar.zst wallabag-db2b4bf678c4c9e778ed0b817df182c9ee06520f.zip |
remove JsonResponse
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index e25ac6db..612c59d1 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php | |||
@@ -5,7 +5,6 @@ namespace Wallabag\CoreBundle\Controller; | |||
5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 5 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\JsonResponse; | ||
9 | use Symfony\Component\HttpFoundation\Response; | 8 | use Symfony\Component\HttpFoundation\Response; |
10 | use Wallabag\CoreBundle\Entity\Entry; | 9 | use Wallabag\CoreBundle\Entity\Entry; |
11 | use Wallabag\CoreBundle\Entity\Tag; | 10 | use Wallabag\CoreBundle\Entity\Tag; |
@@ -94,7 +93,7 @@ class WallabagRestController extends Controller | |||
94 | 93 | ||
95 | $json = $this->get('serializer')->serialize($entries, 'json'); | 94 | $json = $this->get('serializer')->serialize($entries, 'json'); |
96 | 95 | ||
97 | return new JsonResponse($json, 200); | 96 | return new Response($json, 200, array('application/json')); |
98 | } | 97 | } |
99 | 98 | ||
100 | /** | 99 | /** |
@@ -115,7 +114,7 @@ class WallabagRestController extends Controller | |||
115 | 114 | ||
116 | $json = $this->get('serializer')->serialize($entry, 'json'); | 115 | $json = $this->get('serializer')->serialize($entry, 'json'); |
117 | 116 | ||
118 | return new JsonResponse($json, 200); | 117 | return new Response($json, 200, array('application/json')); |
119 | } | 118 | } |
120 | 119 | ||
121 | /** | 120 | /** |
@@ -151,7 +150,7 @@ class WallabagRestController extends Controller | |||
151 | 150 | ||
152 | $json = $this->get('serializer')->serialize($entry, 'json'); | 151 | $json = $this->get('serializer')->serialize($entry, 'json'); |
153 | 152 | ||
154 | return new JsonResponse($json, 200); | 153 | return new Response($json, 200, array('application/json')); |
155 | } | 154 | } |
156 | 155 | ||
157 | /** | 156 | /** |
@@ -202,7 +201,7 @@ class WallabagRestController extends Controller | |||
202 | 201 | ||
203 | $json = $this->get('serializer')->serialize($entry, 'json'); | 202 | $json = $this->get('serializer')->serialize($entry, 'json'); |
204 | 203 | ||
205 | return new JsonResponse($json, 200); | 204 | return new Response($json, 200, array('application/json')); |
206 | } | 205 | } |
207 | 206 | ||
208 | /** | 207 | /** |
@@ -227,7 +226,7 @@ class WallabagRestController extends Controller | |||
227 | 226 | ||
228 | $json = $this->get('serializer')->serialize($entry, 'json'); | 227 | $json = $this->get('serializer')->serialize($entry, 'json'); |
229 | 228 | ||
230 | return new JsonResponse($json, 200); | 229 | return new Response($json, 200, array('application/json')); |
231 | } | 230 | } |
232 | 231 | ||
233 | /** | 232 | /** |
@@ -279,7 +278,7 @@ class WallabagRestController extends Controller | |||
279 | 278 | ||
280 | $json = $this->get('serializer')->serialize($entry, 'json'); | 279 | $json = $this->get('serializer')->serialize($entry, 'json'); |
281 | 280 | ||
282 | return new JsonResponse($json, 200); | 281 | return new Response($json, 200, array('application/json')); |
283 | } | 282 | } |
284 | 283 | ||
285 | /** | 284 | /** |
@@ -305,7 +304,7 @@ class WallabagRestController extends Controller | |||
305 | 304 | ||
306 | $json = $this->get('serializer')->serialize($entry, 'json'); | 305 | $json = $this->get('serializer')->serialize($entry, 'json'); |
307 | 306 | ||
308 | return new JsonResponse($json, 200); | 307 | return new Response($json, 200, array('application/json')); |
309 | } | 308 | } |
310 | 309 | ||
311 | /** | 310 | /** |
@@ -317,7 +316,7 @@ class WallabagRestController extends Controller | |||
317 | { | 316 | { |
318 | $json = $this->get('serializer')->serialize($this->getUser()->getTags(), 'json'); | 317 | $json = $this->get('serializer')->serialize($this->getUser()->getTags(), 'json'); |
319 | 318 | ||
320 | return new JsonResponse($json, 200); | 319 | return new Response($json, 200, array('application/json')); |
321 | } | 320 | } |
322 | 321 | ||
323 | /** | 322 | /** |
@@ -341,6 +340,6 @@ class WallabagRestController extends Controller | |||
341 | 340 | ||
342 | $json = $this->get('serializer')->serialize($tag, 'json'); | 341 | $json = $this->get('serializer')->serialize($tag, 'json'); |
343 | 342 | ||
344 | return new JsonResponse($json, 200); | 343 | return new Response($json, 200, array('application/json')); |
345 | } | 344 | } |
346 | } | 345 | } |