diff options
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 7 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/AccessToken.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/AuthCode.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/Client.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/RefreshToken.php | 2 |
5 files changed, 8 insertions, 7 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'); |
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index b1f4e7de..2ff63a83 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_access_tokens") | 9 | * @ORM\Table("oauth2_access_tokens") |
diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 81398158..4d4b09fe 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_auth_codes") | 9 | * @ORM\Table("oauth2_auth_codes") |
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index d449870a..c04ed0f6 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\Client as BaseClient; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\Client as BaseClient; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_clients") | 9 | * @ORM\Table("oauth2_clients") |
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index be2c1d2e..6d0cab68 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | 3 | namespace Wallabag\ApiBundle\Entity; |
4 | 4 | ||
5 | use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | ||
6 | use Doctrine\ORM\Mapping as ORM; | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_refresh_tokens") | 9 | * @ORM\Table("oauth2_refresh_tokens") |