diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-12-24 15:22:56 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-02 23:27:41 +0100 |
commit | 0aa344dc247c77376fcbf2112191f9f8b3dfc846 (patch) | |
tree | 4b9b958e6652ae389af93e9ac2b6c05ec366fcd6 /src/Wallabag/ImportBundle/Controller | |
parent | 5a4bbcc9a76fcdf54a6af25fcf7b26c9053a0ba3 (diff) | |
download | wallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.tar.gz wallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.tar.zst wallabag-0aa344dc247c77376fcbf2112191f9f8b3dfc846.zip |
Update url & service name
Prefix ur with service namel: [service]_[route name]
Add comment in Interface
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/PocketController.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php index f851c81c..2ab062e7 100644 --- a/src/Wallabag/ImportBundle/Controller/PocketController.php +++ b/src/Wallabag/ImportBundle/Controller/PocketController.php | |||
@@ -8,7 +8,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |||
8 | class PocketController extends Controller | 8 | class PocketController extends Controller |
9 | { | 9 | { |
10 | /** | 10 | /** |
11 | * @Route("/import/pocket", name="pocket") | 11 | * @Route("/import/pocket", name="pocket_import") |
12 | */ | 12 | */ |
13 | public function indexAction() | 13 | public function indexAction() |
14 | { | 14 | { |
@@ -16,22 +16,25 @@ class PocketController extends Controller | |||
16 | } | 16 | } |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * @Route("/import/pocket/auth", name="authpocket") | 19 | * @Route("/import/pocket/auth", name="pocket_auth") |
20 | */ | 20 | */ |
21 | public function authAction() | 21 | public function authAction() |
22 | { | 22 | { |
23 | $pocket = $this->get('wallabag_import.import.pocket_import'); | 23 | $pocket = $this->get('wallabag_import.pocket.import'); |
24 | $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true)); | 24 | $authUrl = $pocket->oAuthRequest( |
25 | $this->generateUrl('import', array(), true), | ||
26 | $this->generateUrl('pocket_callback', array(), true) | ||
27 | ); | ||
25 | 28 | ||
26 | return $this->redirect($authUrl, 301); | 29 | return $this->redirect($authUrl, 301); |
27 | } | 30 | } |
28 | 31 | ||
29 | /** | 32 | /** |
30 | * @Route("/import/pocket/callback", name="callbackpocket") | 33 | * @Route("/import/pocket/callback", name="pocket_callback") |
31 | */ | 34 | */ |
32 | public function callbackAction() | 35 | public function callbackAction() |
33 | { | 36 | { |
34 | $pocket = $this->get('wallabag_import.import.pocket_import'); | 37 | $pocket = $this->get('wallabag_import.pocket.import'); |
35 | $accessToken = $pocket->oAuthAuthorize(); | 38 | $accessToken = $pocket->oAuthAuthorize(); |
36 | $pocket->import($accessToken); | 39 | $pocket->import($accessToken); |
37 | 40 | ||