diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-10-11 09:55:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 09:55:03 +0200 |
commit | d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862 (patch) | |
tree | 3f7ea5ce149b98d01a32f45c2d5be43fbf8ea21c /src/Wallabag/ApiBundle/Controller/UserRestController.php | |
parent | 21bdbb2d5e8ef1a93a51bc6d55e041f95820b4ba (diff) | |
parent | f645d371ce55e9c2a45712df34244318742b0d74 (diff) | |
download | wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.tar.gz wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.tar.zst wallabag-d8dc7372ab3d8ac4c5d5546e5c5e00bf4bf2d862.zip |
Merge pull request #3376 from wallabag/symfony-3.3
Symfony 3.3
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]) |