diff options
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 354a6f8e..d9035cac 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -3,13 +3,14 @@ | |||
3 | namespace Wallabag\ApiBundle\Controller; | 3 | namespace Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use FOS\RestBundle\Controller\FOSRestController; | 5 | use FOS\RestBundle\Controller\FOSRestController; |
6 | use Hateoas\Configuration\Route; | ||
7 | use Hateoas\Representation\Factory\PagerfantaFactory; | ||
6 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 8 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
7 | use Symfony\Component\HttpFoundation\Request; | 9 | use Symfony\Component\HttpFoundation\Request; |
8 | use Symfony\Component\HttpFoundation\Response; | 10 | use Symfony\Component\HttpFoundation\Response; |
11 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
9 | use Wallabag\CoreBundle\Entity\Entry; | 12 | use Wallabag\CoreBundle\Entity\Entry; |
10 | use Wallabag\CoreBundle\Entity\Tag; | 13 | use Wallabag\CoreBundle\Entity\Tag; |
11 | use Hateoas\Configuration\Route; | ||
12 | use Hateoas\Representation\Factory\PagerfantaFactory; | ||
13 | 14 | ||
14 | class WallabagRestController extends FOSRestController | 15 | class WallabagRestController extends FOSRestController |
15 | { | 16 | { |
@@ -84,7 +85,7 @@ class WallabagRestController extends FOSRestController | |||
84 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); | 85 | $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); |
85 | $paginatedCollection = $pagerfantaFactory->createRepresentation( | 86 | $paginatedCollection = $pagerfantaFactory->createRepresentation( |
86 | $pager, | 87 | $pager, |
87 | new Route('api_get_entries', [], $absolute = true) | 88 | new Route('api_get_entries', [], UrlGeneratorInterface::ABSOLUTE_URL) |
88 | ); | 89 | ); |
89 | 90 | ||
90 | $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); | 91 | $json = $this->get('serializer')->serialize($paginatedCollection, 'json'); |