aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/UserRestController.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-10-09 16:45:09 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-10-09 16:45:12 +0200
commitf40c88eb1fa349aab600f9c1c94364f317fe62dd (patch)
tree4f57a7b2d5124541c4bc916a38d9dab262737db0 /src/Wallabag/ApiBundle/Controller/UserRestController.php
parented5e175c200501e2ee115ff5d8cd3f3ea47a1c2f (diff)
downloadwallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.tar.gz
wallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.tar.zst
wallabag-f40c88eb1fa349aab600f9c1c94364f317fe62dd.zip
Jump to Symfony 3.3 & update others deps
Also update tests urls
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/UserRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/UserRestController.php6
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])