aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/ImportBundle/Controller/PocketController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/PocketController.php b/src/Wallabag/ImportBundle/Controller/PocketController.php
index 76d8417b..9602c282 100644
--- a/src/Wallabag/ImportBundle/Controller/PocketController.php
+++ b/src/Wallabag/ImportBundle/Controller/PocketController.php
@@ -21,7 +21,7 @@ class PocketController extends Controller
21 */ 21 */
22 public function authAction() 22 public function authAction()
23 { 23 {
24 $pocket = new PocketImport($this->get('security.token_storage'), $this->get('session'), $this->getDoctrine()->getManager(), $this->container->getParameter('pocket_consumer_key')); 24 $pocket = $this->get('wallabag_import.import.pocket_import');
25 $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true)); 25 $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true));
26 26
27 return $this->redirect($authUrl, 301); 27 return $this->redirect($authUrl, 301);
@@ -32,7 +32,7 @@ class PocketController extends Controller
32 */ 32 */
33 public function callbackAction() 33 public function callbackAction()
34 { 34 {
35 $pocket = new PocketImport($this->get('security.token_storage'), $this->get('session'), $this->getDoctrine()->getManager(), $this->container->getParameter('pocket_consumer_key')); 35 $pocket = $this->get('wallabag_import.import.pocket_import');
36 $accessToken = $pocket->oAuthAuthorize(); 36 $accessToken = $pocket->oAuthAuthorize();
37 $pocket->import($accessToken); 37 $pocket->import($accessToken);
38 38