mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-10 18:51:02 +00:00
Jump to Symfony 3.3 & update others deps
Also update tests urls
This commit is contained in:
parent
ed5e175c20
commit
f40c88eb1f
18 changed files with 52 additions and 30 deletions
|
@ -46,7 +46,7 @@ class UserRestController extends WallabagRestController
|
|||
public function putUserAction(Request $request)
|
||||
{
|
||||
if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
|
||||
$json = $this->get('serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
|
||||
$json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
|
||||
|
||||
return (new JsonResponse())
|
||||
->setJson($json)
|
||||
|
@ -92,7 +92,7 @@ class UserRestController extends WallabagRestController
|
|||
$errors['password'] = $this->translateErrors($data['plainPassword']['children']['first']['errors']);
|
||||
}
|
||||
|
||||
$json = $this->get('serializer')->serialize(['error' => $errors], 'json');
|
||||
$json = $this->get('jms_serializer')->serialize(['error' => $errors], 'json');
|
||||
|
||||
return (new JsonResponse())
|
||||
->setJson($json)
|
||||
|
@ -127,7 +127,7 @@ class UserRestController extends WallabagRestController
|
|||
*/
|
||||
private function sendUser(User $user, $group = 'user_api', $status = JsonResponse::HTTP_OK)
|
||||
{
|
||||
$json = $this->get('serializer')->serialize(
|
||||
$json = $this->get('jms_serializer')->serialize(
|
||||
$user,
|
||||
'json',
|
||||
SerializationContext::create()->setGroups([$group])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue