]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/TagRestController.php
Jump to Symfony 3.3 & update others deps
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / TagRestController.php
index 47298d7e068b8295d2538aba24e658490f98a9be..d19f122833f6980780799406a46783e6493ba9df 100644 (file)
@@ -3,8 +3,8 @@
 namespace Wallabag\ApiBundle\Controller;
 
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
-use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\JsonResponse;
+use Symfony\Component\HttpFoundation\Request;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 
@@ -25,7 +25,7 @@ class TagRestController extends WallabagRestController
             ->getRepository('WallabagCoreBundle:Tag')
             ->findAllTags($this->getUser()->getId());
 
-        $json = $this->get('serializer')->serialize($tags, 'json');
+        $json = $this->get('jms_serializer')->serialize($tags, 'json');
 
         return (new JsonResponse())->setJson($json);
     }
@@ -44,7 +44,7 @@ class TagRestController extends WallabagRestController
     public function deleteTagLabelAction(Request $request)
     {
         $this->validateAuthentication();
-        $label = $request->request->get('tag', '');
+        $label = $request->get('tag', '');
 
         $tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label);
 
@@ -58,7 +58,7 @@ class TagRestController extends WallabagRestController
 
         $this->cleanOrphanTag($tag);
 
-        $json = $this->get('serializer')->serialize($tag, 'json');
+        $json = $this->get('jms_serializer')->serialize($tag, 'json');
 
         return (new JsonResponse())->setJson($json);
     }
@@ -78,7 +78,7 @@ class TagRestController extends WallabagRestController
     {
         $this->validateAuthentication();
 
-        $tagsLabels = $request->request->get('tags', '');
+        $tagsLabels = $request->get('tags', '');
 
         $tags = [];
 
@@ -100,7 +100,7 @@ class TagRestController extends WallabagRestController
 
         $this->cleanOrphanTag($tags);
 
-        $json = $this->get('serializer')->serialize($tags, 'json');
+        $json = $this->get('jms_serializer')->serialize($tags, 'json');
 
         return (new JsonResponse())->setJson($json);
     }
@@ -126,7 +126,7 @@ class TagRestController extends WallabagRestController
 
         $this->cleanOrphanTag($tag);
 
-        $json = $this->get('serializer')->serialize($tag, 'json');
+        $json = $this->get('jms_serializer')->serialize($tag, 'json');
 
         return (new JsonResponse())->setJson($json);
     }