forked from wallabag/wallabag
Re-create all API routes
This commit is contained in:
@ -7,6 +7,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Swagger\Annotations as SWG;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||
use Wallabag\CoreBundle\Entity\Entry;
|
||||
|
||||
@ -32,6 +33,8 @@ class AnnotationRestController extends WallabagRestController
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @Route("/api/annotations/{entry}.{_format}", methods={"GET"}, name="api_get_annotations", defaults={"_format": "json"})
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function getAnnotationsAction(Entry $entry)
|
||||
@ -88,6 +91,8 @@ class AnnotationRestController extends WallabagRestController
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @Route("/api/annotations/{entry}.{_format}", methods={"POST"}, name="api_post_annotation", defaults={"_format": "json"})
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function postAnnotationAction(Request $request, Entry $entry)
|
||||
@ -120,6 +125,7 @@ class AnnotationRestController extends WallabagRestController
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @Route("/api/annotations/{annotation}.{_format}", methods={"PUT"}, name="api_put_annotation", defaults={"_format": "json"})
|
||||
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
|
||||
*
|
||||
* @return JsonResponse
|
||||
@ -154,6 +160,7 @@ class AnnotationRestController extends WallabagRestController
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @Route("/api/annotations/{annotation}.{_format}", methods={"DELETE"}, name="api_delete_annotation", defaults={"_format": "json"})
|
||||
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
|
||||
*
|
||||
* @return JsonResponse
|
||||
|
||||
Reference in New Issue
Block a user