]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/WallabagRestController.php
add relation between entry and tag
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / WallabagRestController.php
index 276cfe1c78b18412aaa0577c753c3b3418280c08..b895b67cd913b881bbd765f06918d54972576c64 100644 (file)
@@ -6,7 +6,6 @@ use Nelmio\ApiDocBundle\Annotation\ApiDoc;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 use Wallabag\CoreBundle\Entity\Entry;
 use Wallabag\CoreBundle\Entity\Tag;
 use Wallabag\CoreBundle\Service\Extractor;
@@ -197,6 +196,9 @@ class WallabagRestController extends Controller
      */
     public function getEntriesTagsAction(Entry $entry)
     {
+        $json = $this->get('serializer')->serialize($entry, 'json');
+
+        return new Response($json, 200, array('application/json'));
     }
 
     /**
@@ -233,22 +235,10 @@ class WallabagRestController extends Controller
      * Retrieve all tags
      *
      * @ApiDoc(
+     *          {"name"="user", "dataType"="integer", "requirement"="\w+", "description"="The user ID"}
      * )
      */
-    public function getTagsAction()
-    {
-    }
-
-    /**
-     * Retrieve a single tag
-     *
-     * @ApiDoc(
-     *       requirements={
-     *          {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}
-     *       }
-     * )
-     */
-    public function getTagAction(Tag $tag)
+    public function getTagsUserAction()
     {
     }