]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Controller/PocketController.php
Update after previous merge
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Controller / PocketController.php
index 9602c2823b621092bbefc6ce8e31402b0bb0cf30..2ab062e70c151ae685effd1ceb35ae2c3aed32f4 100644 (file)
@@ -4,35 +4,37 @@ namespace Wallabag\ImportBundle\Controller;
 
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
-use Wallabag\ImportBundle\Import\PocketImport;
 
 class PocketController extends Controller
 {
     /**
-     * @Route("/import", name="import")
+     * @Route("/import/pocket", name="pocket_import")
      */
-    public function importAction()
+    public function indexAction()
     {
         return $this->render('WallabagImportBundle:Pocket:index.html.twig', array());
     }
 
     /**
-     * @Route("/auth-pocket", name="authpocket")
+     * @Route("/import/pocket/auth", name="pocket_auth")
      */
     public function authAction()
     {
-        $pocket = $this->get('wallabag_import.import.pocket_import');
-        $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true));
+        $pocket = $this->get('wallabag_import.pocket.import');
+        $authUrl = $pocket->oAuthRequest(
+            $this->generateUrl('import', array(), true),
+            $this->generateUrl('pocket_callback', array(), true)
+        );
 
         return $this->redirect($authUrl, 301);
     }
 
     /**
-     * @Route("/callback-pocket", name="callbackpocket")
+     * @Route("/import/pocket/callback", name="pocket_callback")
      */
     public function callbackAction()
     {
-        $pocket = $this->get('wallabag_import.import.pocket_import');
+        $pocket = $this->get('wallabag_import.pocket.import');
         $accessToken = $pocket->oAuthAuthorize();
         $pocket->import($accessToken);