]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Controller/WallabagRestController.php
Merge remote-tracking branch 'origin/master' into 2.2
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / WallabagRestController.php
index e2e4924b6ef50d8d391f7e83d0c098b07a795123..a73d44ca2bc35f79be45dbe004df022b552baa22 100644 (file)
@@ -529,25 +529,21 @@ class WallabagRestController extends FOSRestController
      * )
      *
      * @param Entry $entry
+     *
      * @return JsonResponse
      */
     public function getAnnotationsAction(Entry $entry)
     {
         $this->validateAuthentication();
 
-        $response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations',
-            [
-                'entry' => $entry
-            ]);
-        return $response;
+        return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:getAnnotations', [
+            'entry' => $entry,
+        ]);
     }
 
     /**
      * Creates a new annotation.
      *
-     * @param Request $request
-     * @param Entry $entry
-     * @return JsonResponse
      * @ApiDoc(
      *      requirements={
      *          {"name"="ranges", "dataType"="array", "requirement"="\w+", "description"="The range array for the annotation"},
@@ -556,17 +552,19 @@ class WallabagRestController extends FOSRestController
      *      }
      * )
      *
+     * @param Request $request
+     * @param Entry   $entry
+     *
+     * @return JsonResponse
      */
     public function postAnnotationAction(Request $request, Entry $entry)
     {
         $this->validateAuthentication();
 
-        $response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation',
-            [
-                'request' => $request,
-                'entry' => $entry
-            ]);
-        return $response;
+        return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:postAnnotation', [
+            'request' => $request,
+            'entry' => $entry,
+        ]);
     }
 
     /**
@@ -581,19 +579,18 @@ class WallabagRestController extends FOSRestController
      * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
      *
      * @param Annotation $annotation
-     * @param Request $request
+     * @param Request    $request
+     *
      * @return JsonResponse
      */
     public function putAnnotationAction(Annotation $annotation, Request $request)
     {
         $this->validateAuthentication();
 
-        $response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation',
-            [
-                'annotation' => $annotation,
-                'request' => $request
-            ]);
-        return $response;
+        return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:putAnnotation', [
+            'annotation' => $annotation,
+            'request' => $request,
+        ]);
     }
 
     /**
@@ -608,17 +605,16 @@ class WallabagRestController extends FOSRestController
      * @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
      *
      * @param Annotation $annotation
+     *
      * @return JsonResponse
      */
     public function deleteAnnotationAction(Annotation $annotation)
     {
         $this->validateAuthentication();
 
-        $response = $this->forward('WallabagApiBundle:WallabagRest:deleteAnnotation',
-            [
-                'annotation' => $annotation,
-            ]);
-        return $response;
+        return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:deleteAnnotation', [
+            'annotation' => $annotation,
+        ]);
     }
 
     /**