diff options
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/UserRestController.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/UserRestController.php | 6 |
1 files changed, 3 insertions, 3 deletions
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]) |