aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Controller')
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php15
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;
8class PocketController extends Controller 8class 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