forked from wallabag/wallabag
Re-create all API routes
This commit is contained in:
@ -8,6 +8,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\AnnotationBundle\Form\EditAnnotationType;
|
||||
use Wallabag\AnnotationBundle\Form\NewAnnotationType;
|
||||
@ -20,6 +21,8 @@ class WallabagAnnotationController extends AbstractFOSRestController
|
||||
*
|
||||
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
||||
*
|
||||
* @Route("/annotations/{entry}.{_format}", methods={"GET"}, name="annotations_get_annotations", defaults={"_format": "json"})
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function getAnnotationsAction(Entry $entry)
|
||||
@ -39,9 +42,11 @@ class WallabagAnnotationController extends AbstractFOSRestController
|
||||
/**
|
||||
* Creates a new annotation.
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
||||
*
|
||||
* @Route("/annotations/{entry}.{_format}", methods={"POST"}, name="annotations_post_annotation", defaults={"_format": "json"})
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function postAnnotationAction(Request $request, Entry $entry)
|
||||
{
|
||||
@ -74,6 +79,7 @@ class WallabagAnnotationController extends AbstractFOSRestController
|
||||
*
|
||||
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
||||
*
|
||||
* @Route("/annotations/{annotation}.{_format}", methods={"PUT"}, name="annotations_put_annotation", defaults={"_format": "json"})
|
||||
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -106,6 +112,7 @@ class WallabagAnnotationController extends AbstractFOSRestController
|
||||
*
|
||||
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
||||
*
|
||||
* @Route("/annotations/{annotation}.{_format}", methods={"DELETE"}, name="annotations_delete_annotation", defaults={"_format": "json"})
|
||||
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
||||
Reference in New Issue
Block a user