X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FTagRestController.php;h=efa4e8cfc1ea5b072121078c8532a970e54485e0;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=4e7ddc6621baadfa2d756f4495b49e25a2cb6189;hpb=3be554c78f1d68c3969a85d163d9bb081ba525d0;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/TagRestController.php b/src/Wallabag/ApiBundle/Controller/TagRestController.php index 4e7ddc66..efa4e8cf 100644 --- a/src/Wallabag/ApiBundle/Controller/TagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/TagRestController.php @@ -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; @@ -31,7 +31,7 @@ class TagRestController extends WallabagRestController } /** - * Permanently remove one tag from **every** entry. + * Permanently remove one tag from **every** entry by passing the Tag label. * * @ApiDoc( * requirements={ @@ -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); @@ -78,7 +78,7 @@ class TagRestController extends WallabagRestController { $this->validateAuthentication(); - $tagsLabels = $request->request->get('tags', ''); + $tagsLabels = $request->get('tags', ''); $tags = []; @@ -106,7 +106,7 @@ class TagRestController extends WallabagRestController } /** - * Permanently remove one tag from **every** entry. + * Permanently remove one tag from **every** entry by passing the Tag ID. * * @ApiDoc( * requirements={ @@ -131,22 +131,6 @@ class TagRestController extends WallabagRestController return (new JsonResponse())->setJson($json); } - /** - * Retrieve version number. - * - * @ApiDoc() - * - * @return JsonResponse - */ - public function getVersionAction() - { - $version = $this->container->getParameter('wallabag_core.version'); - - $json = $this->get('serializer')->serialize($version, 'json'); - - return (new JsonResponse())->setJson($json); - } - /** * Remove orphan tag in case no entries are associated to it. *