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;
}
/**
- * Permanently remove one tag from **every** entry.
+ * Permanently remove one tag from **every** entry by passing the Tag label.
*
* @ApiDoc(
* requirements={
public function deleteTagLabelAction(Request $request)
{
$this->validateAuthentication();
- $label = $request->request->get('tag', '');
+ $label = $request->get('tag', '');
$tag = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findOneByLabel($label);
{
$this->validateAuthentication();
- $tagsLabels = $request->request->get('tags', '');
+ $tagsLabels = $request->get('tags', '');
$tags = [];
}
/**
- * Permanently remove one tag from **every** entry.
+ * Permanently remove one tag from **every** entry by passing the Tag ID.
*
* @ApiDoc(
* requirements={
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.
*