diff options
Diffstat (limited to 'src/Wallabag')
-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 | } |