diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-10-06 11:40:14 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-22 09:06:07 +0200 |
commit | b1e92f8c14d3d506f2bfab628ba8ed95de0e8b51 (patch) | |
tree | 753f752dae1d8c421a04e218d65d6df183a6b89f /src/Wallabag | |
parent | 1eea248bb0ebf49772878557211817905a4d6952 (diff) | |
download | wallabag-b1e92f8c14d3d506f2bfab628ba8ed95de0e8b51.tar.gz wallabag-b1e92f8c14d3d506f2bfab628ba8ed95de0e8b51.tar.zst wallabag-b1e92f8c14d3d506f2bfab628ba8ed95de0e8b51.zip |
cs
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | 10 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 19 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php index b04c0bc2..519fd2f5 100644 --- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php +++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | |||
@@ -5,7 +5,6 @@ namespace Wallabag\AnnotationBundle\Controller; | |||
5 | use FOS\RestBundle\Controller\FOSRestController; | 5 | use FOS\RestBundle\Controller\FOSRestController; |
6 | use Symfony\Component\HttpFoundation\JsonResponse; | 6 | use Symfony\Component\HttpFoundation\JsonResponse; |
7 | use Symfony\Component\HttpFoundation\Request; | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\Response; | ||
9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
10 | use Wallabag\AnnotationBundle\Entity\Annotation; | 9 | use Wallabag\AnnotationBundle\Entity\Annotation; |
11 | use Wallabag\CoreBundle\Entity\Entry; | 10 | use Wallabag\CoreBundle\Entity\Entry; |
@@ -39,10 +38,11 @@ class WallabagAnnotationController extends FOSRestController | |||
39 | * Creates a new annotation. | 38 | * Creates a new annotation. |
40 | * | 39 | * |
41 | * @param Request $request | 40 | * @param Request $request |
42 | * @param Entry $entry | 41 | * @param Entry $entry |
42 | * | ||
43 | * @return JsonResponse | 43 | * @return JsonResponse |
44 | * @see Wallabag\ApiBundle\Controller\WallabagRestController | ||
45 | * | 44 | * |
45 | * @see Wallabag\ApiBundle\Controller\WallabagRestController | ||
46 | */ | 46 | */ |
47 | public function postAnnotationAction(Request $request, Entry $entry) | 47 | public function postAnnotationAction(Request $request, Entry $entry) |
48 | { | 48 | { |
@@ -78,7 +78,8 @@ class WallabagAnnotationController extends FOSRestController | |||
78 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 78 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
79 | * | 79 | * |
80 | * @param Annotation $annotation | 80 | * @param Annotation $annotation |
81 | * @param Request $request | 81 | * @param Request $request |
82 | * | ||
82 | * @return JsonResponse | 83 | * @return JsonResponse |
83 | */ | 84 | */ |
84 | public function putAnnotationAction(Annotation $annotation, Request $request) | 85 | public function putAnnotationAction(Annotation $annotation, Request $request) |
@@ -105,6 +106,7 @@ class WallabagAnnotationController extends FOSRestController | |||
105 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 106 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
106 | * | 107 | * |
107 | * @param Annotation $annotation | 108 | * @param Annotation $annotation |
109 | * | ||
108 | * @return JsonResponse | 110 | * @return JsonResponse |
109 | */ | 111 | */ |
110 | public function deleteAnnotationAction(Annotation $annotation) | 112 | public function deleteAnnotationAction(Annotation $annotation) |
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index e2e4924b..b30ab267 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -529,6 +529,7 @@ class WallabagRestController extends FOSRestController | |||
529 | * ) | 529 | * ) |
530 | * | 530 | * |
531 | * @param Entry $entry | 531 | * @param Entry $entry |
532 | * | ||
532 | * @return JsonResponse | 533 | * @return JsonResponse |
533 | */ | 534 | */ |
534 | public function getAnnotationsAction(Entry $entry) | 535 | public function getAnnotationsAction(Entry $entry) |
@@ -537,8 +538,9 @@ class WallabagRestController extends FOSRestController | |||
537 | 538 | ||
538 | $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', | 539 | $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations', |
539 | [ | 540 | [ |
540 | 'entry' => $entry | 541 | 'entry' => $entry, |
541 | ]); | 542 | ]); |
543 | |||
542 | return $response; | 544 | return $response; |
543 | } | 545 | } |
544 | 546 | ||
@@ -546,7 +548,8 @@ class WallabagRestController extends FOSRestController | |||
546 | * Creates a new annotation. | 548 | * Creates a new annotation. |
547 | * | 549 | * |
548 | * @param Request $request | 550 | * @param Request $request |
549 | * @param Entry $entry | 551 | * @param Entry $entry |
552 | * | ||
550 | * @return JsonResponse | 553 | * @return JsonResponse |
551 | * @ApiDoc( | 554 | * @ApiDoc( |
552 | * requirements={ | 555 | * requirements={ |
@@ -555,7 +558,6 @@ class WallabagRestController extends FOSRestController | |||
555 | * {"name"="text", "dataType"="string", "required"=true, "description"=""}, | 558 | * {"name"="text", "dataType"="string", "required"=true, "description"=""}, |
556 | * } | 559 | * } |
557 | * ) | 560 | * ) |
558 | * | ||
559 | */ | 561 | */ |
560 | public function postAnnotationAction(Request $request, Entry $entry) | 562 | public function postAnnotationAction(Request $request, Entry $entry) |
561 | { | 563 | { |
@@ -564,8 +566,9 @@ class WallabagRestController extends FOSRestController | |||
564 | $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', | 566 | $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation', |
565 | [ | 567 | [ |
566 | 'request' => $request, | 568 | 'request' => $request, |
567 | 'entry' => $entry | 569 | 'entry' => $entry, |
568 | ]); | 570 | ]); |
571 | |||
569 | return $response; | 572 | return $response; |
570 | } | 573 | } |
571 | 574 | ||
@@ -581,7 +584,8 @@ class WallabagRestController extends FOSRestController | |||
581 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 584 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
582 | * | 585 | * |
583 | * @param Annotation $annotation | 586 | * @param Annotation $annotation |
584 | * @param Request $request | 587 | * @param Request $request |
588 | * | ||
585 | * @return JsonResponse | 589 | * @return JsonResponse |
586 | */ | 590 | */ |
587 | public function putAnnotationAction(Annotation $annotation, Request $request) | 591 | public function putAnnotationAction(Annotation $annotation, Request $request) |
@@ -591,8 +595,9 @@ class WallabagRestController extends FOSRestController | |||
591 | $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', | 595 | $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation', |
592 | [ | 596 | [ |
593 | 'annotation' => $annotation, | 597 | 'annotation' => $annotation, |
594 | 'request' => $request | 598 | 'request' => $request, |
595 | ]); | 599 | ]); |
600 | |||
596 | return $response; | 601 | return $response; |
597 | } | 602 | } |
598 | 603 | ||
@@ -608,6 +613,7 @@ class WallabagRestController extends FOSRestController | |||
608 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") | 613 | * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation") |
609 | * | 614 | * |
610 | * @param Annotation $annotation | 615 | * @param Annotation $annotation |
616 | * | ||
611 | * @return JsonResponse | 617 | * @return JsonResponse |
612 | */ | 618 | */ |
613 | public function deleteAnnotationAction(Annotation $annotation) | 619 | public function deleteAnnotationAction(Annotation $annotation) |
@@ -618,6 +624,7 @@ class WallabagRestController extends FOSRestController | |||
618 | [ | 624 | [ |
619 | 'annotation' => $annotation, | 625 | 'annotation' => $annotation, |
620 | ]); | 626 | ]); |
627 | |||
621 | return $response; | 628 | return $response; |
622 | } | 629 | } |
623 | 630 | ||