aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php2
-rw-r--r--src/Wallabag/ApiBundle/Controller/TagRestController.php8
-rw-r--r--src/Wallabag/ApiBundle/Controller/UserRestController.php6
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
index 6db97731..86e72335 100644
--- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php
@@ -752,7 +752,7 @@ class EntryRestController extends WallabagRestController
752 $context = new SerializationContext(); 752 $context = new SerializationContext();
753 $context->setSerializeNull(true); 753 $context->setSerializeNull(true);
754 754
755 $json = $this->get('serializer')->serialize($data, 'json', $context); 755 $json = $this->get('jms_serializer')->serialize($data, 'json', $context);
756 756
757 return (new JsonResponse())->setJson($json); 757 return (new JsonResponse())->setJson($json);
758 } 758 }
diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php
index efa4e8cf..d19f1228 100644
--- a/src/Wallabag/ApiBundle/Controller/TagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php
@@ -25,7 +25,7 @@ class TagRestController extends WallabagRestController
25 ->getRepository('WallabagCoreBundle:Tag') 25 ->getRepository('WallabagCoreBundle:Tag')
26 ->findAllTags($this->getUser()->getId()); 26 ->findAllTags($this->getUser()->getId());
27 27
28 $json = $this->get('serializer')->serialize($tags, 'json'); 28 $json = $this->get('jms_serializer')->serialize($tags, 'json');
29 29
30 return (new JsonResponse())->setJson($json); 30 return (new JsonResponse())->setJson($json);
31 } 31 }
@@ -58,7 +58,7 @@ class TagRestController extends WallabagRestController
58 58
59 $this->cleanOrphanTag($tag); 59 $this->cleanOrphanTag($tag);
60 60
61 $json = $this->get('serializer')->serialize($tag, 'json'); 61 $json = $this->get('jms_serializer')->serialize($tag, 'json');
62 62
63 return (new JsonResponse())->setJson($json); 63 return (new JsonResponse())->setJson($json);
64 } 64 }
@@ -100,7 +100,7 @@ class TagRestController extends WallabagRestController
100 100
101 $this->cleanOrphanTag($tags); 101 $this->cleanOrphanTag($tags);
102 102
103 $json = $this->get('serializer')->serialize($tags, 'json'); 103 $json = $this->get('jms_serializer')->serialize($tags, 'json');
104 104
105 return (new JsonResponse())->setJson($json); 105 return (new JsonResponse())->setJson($json);
106 } 106 }
@@ -126,7 +126,7 @@ class TagRestController extends WallabagRestController
126 126
127 $this->cleanOrphanTag($tag); 127 $this->cleanOrphanTag($tag);
128 128
129 $json = $this->get('serializer')->serialize($tag, 'json'); 129 $json = $this->get('jms_serializer')->serialize($tag, 'json');
130 130
131 return (new JsonResponse())->setJson($json); 131 return (new JsonResponse())->setJson($json);
132 } 132 }
diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php
index 6f47cff0..a1378fc5 100644
--- a/src/Wallabag/ApiBundle/Controller/UserRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php
@@ -46,7 +46,7 @@ class UserRestController extends WallabagRestController
46 public function putUserAction(Request $request) 46 public function putUserAction(Request $request)
47 { 47 {
48 if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) { 48 if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
49 $json = $this->get('serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json'); 49 $json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
50 50
51 return (new JsonResponse()) 51 return (new JsonResponse())
52 ->setJson($json) 52 ->setJson($json)
@@ -92,7 +92,7 @@ class UserRestController extends WallabagRestController
92 $errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']); 92 $errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']);
93 } 93 }
94 94
95 $json = $this->get('serializer')->serialize(['error' => $errors], 'json'); 95 $json = $this->get('jms_serializer')->serialize(['error' => $errors], 'json');
96 96
97 return (new JsonResponse()) 97 return (new JsonResponse())
98 ->setJson($json) 98 ->setJson($json)
@@ -127,7 +127,7 @@ class UserRestController extends WallabagRestController
127 */ 127 */
128 private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK) 128 private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK)
129 { 129 {
130 $json = $this->get('serializer')->serialize( 130 $json = $this->get('jms_serializer')->serialize(
131 $user, 131 $user,
132 'json', 132 'json',
133 SerializationContext::create()->setGroups([$group]) 133 SerializationContext::create()->setGroups([$group])
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 71da2a64..7d8cfbba 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -19,7 +19,7 @@ class WallabagRestController extends FOSRestController
19 public function getVersionAction() 19 public function getVersionAction()
20 { 20 {
21 $version = $this->container->getParameter('wallabag_core.version'); 21 $version = $this->container->getParameter('wallabag_core.version');
22 $json = $this->get('serializer')->serialize($version, 'json'); 22 $json = $this->get('jms_serializer')->serialize($version, 'json');
23 23
24 return (new JsonResponse())->setJson($json); 24 return (new JsonResponse())->setJson($json);
25 } 25 }