mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
cs
This commit is contained in:
parent
1eea248bb0
commit
b1e92f8c14
2 changed files with 20 additions and 11 deletions
|
@ -5,7 +5,6 @@ namespace Wallabag\AnnotationBundle\Controller;
|
||||||
use FOS\RestBundle\Controller\FOSRestController;
|
use FOS\RestBundle\Controller\FOSRestController;
|
||||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||||
use Wallabag\AnnotationBundle\Entity\Annotation;
|
use Wallabag\AnnotationBundle\Entity\Annotation;
|
||||||
use Wallabag\CoreBundle\Entity\Entry;
|
use Wallabag\CoreBundle\Entity\Entry;
|
||||||
|
@ -40,9 +39,10 @@ class WallabagAnnotationController extends FOSRestController
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param Entry $entry
|
* @param Entry $entry
|
||||||
* @return JsonResponse
|
|
||||||
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
|
||||||
*
|
*
|
||||||
|
* @return JsonResponse
|
||||||
|
*
|
||||||
|
* @see Wallabag\ApiBundle\Controller\WallabagRestController
|
||||||
*/
|
*/
|
||||||
public function postAnnotationAction(Request $request, Entry $entry)
|
public function postAnnotationAction(Request $request, Entry $entry)
|
||||||
{
|
{
|
||||||
|
@ -79,6 +79,7 @@ class WallabagAnnotationController extends FOSRestController
|
||||||
*
|
*
|
||||||
* @param Annotation $annotation
|
* @param Annotation $annotation
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function putAnnotationAction(Annotation $annotation, Request $request)
|
public function putAnnotationAction(Annotation $annotation, Request $request)
|
||||||
|
@ -105,6 +106,7 @@ class WallabagAnnotationController extends FOSRestController
|
||||||
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
||||||
*
|
*
|
||||||
* @param Annotation $annotation
|
* @param Annotation $annotation
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function deleteAnnotationAction(Annotation $annotation)
|
public function deleteAnnotationAction(Annotation $annotation)
|
||||||
|
|
|
@ -529,6 +529,7 @@ class WallabagRestController extends FOSRestController
|
||||||
* )
|
* )
|
||||||
*
|
*
|
||||||
* @param Entry $entry
|
* @param Entry $entry
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function getAnnotationsAction(Entry $entry)
|
public function getAnnotationsAction(Entry $entry)
|
||||||
|
@ -537,8 +538,9 @@ class WallabagRestController extends FOSRestController
|
||||||
|
|
||||||
$response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations',
|
$response = $this->forward('WallabagApiBundle:WallabagRest:getAnnotations',
|
||||||
[
|
[
|
||||||
'entry' => $entry
|
'entry' => $entry,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,6 +549,7 @@ class WallabagRestController extends FOSRestController
|
||||||
*
|
*
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
* @param Entry $entry
|
* @param Entry $entry
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
* @ApiDoc(
|
* @ApiDoc(
|
||||||
* requirements={
|
* requirements={
|
||||||
|
@ -555,7 +558,6 @@ class WallabagRestController extends FOSRestController
|
||||||
* {"name"="text", "dataType"="string", "required"=true, "description"=""},
|
* {"name"="text", "dataType"="string", "required"=true, "description"=""},
|
||||||
* }
|
* }
|
||||||
* )
|
* )
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public function postAnnotationAction(Request $request, Entry $entry)
|
public function postAnnotationAction(Request $request, Entry $entry)
|
||||||
{
|
{
|
||||||
|
@ -564,8 +566,9 @@ class WallabagRestController extends FOSRestController
|
||||||
$response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation',
|
$response = $this->forward('WallabagApiBundle:WallabagRest:postAnnotation',
|
||||||
[
|
[
|
||||||
'request' => $request,
|
'request' => $request,
|
||||||
'entry' => $entry
|
'entry' => $entry,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -582,6 +585,7 @@ class WallabagRestController extends FOSRestController
|
||||||
*
|
*
|
||||||
* @param Annotation $annotation
|
* @param Annotation $annotation
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function putAnnotationAction(Annotation $annotation, Request $request)
|
public function putAnnotationAction(Annotation $annotation, Request $request)
|
||||||
|
@ -591,8 +595,9 @@ class WallabagRestController extends FOSRestController
|
||||||
$response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation',
|
$response = $this->forward('WallabagApiBundle:WallabagRest:putAnnotation',
|
||||||
[
|
[
|
||||||
'annotation' => $annotation,
|
'annotation' => $annotation,
|
||||||
'request' => $request
|
'request' => $request,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,6 +613,7 @@ class WallabagRestController extends FOSRestController
|
||||||
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
* @ParamConverter("annotation", class="WallabagAnnotationBundle:Annotation")
|
||||||
*
|
*
|
||||||
* @param Annotation $annotation
|
* @param Annotation $annotation
|
||||||
|
*
|
||||||
* @return JsonResponse
|
* @return JsonResponse
|
||||||
*/
|
*/
|
||||||
public function deleteAnnotationAction(Annotation $annotation)
|
public function deleteAnnotationAction(Annotation $annotation)
|
||||||
|
@ -618,6 +624,7 @@ class WallabagRestController extends FOSRestController
|
||||||
[
|
[
|
||||||
'annotation' => $annotation,
|
'annotation' => $annotation,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue