]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
service call
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>
Fri, 23 Oct 2015 12:09:19 +0000 (14:09 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Sat, 2 Jan 2016 22:24:17 +0000 (23:24 +0100)
src/Wallabag/ImportBundle/Controller/PocketController.php

index 76d8417be0f5274708f0dd0d37abc30324c0ab2a..9602c2823b621092bbefc6ce8e31402b0bb0cf30 100644 (file)
@@ -21,7 +21,7 @@ class PocketController extends Controller
      */
     public function authAction()
     {
-        $pocket = new PocketImport($this->get('security.token_storage'), $this->get('session'), $this->getDoctrine()->getManager(), $this->container->getParameter('pocket_consumer_key'));
+        $pocket = $this->get('wallabag_import.import.pocket_import');
         $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true));
 
         return $this->redirect($authUrl, 301);
@@ -32,7 +32,7 @@ class PocketController extends Controller
      */
     public function callbackAction()
     {
-        $pocket = new PocketImport($this->get('security.token_storage'), $this->get('session'), $this->getDoctrine()->getManager(), $this->container->getParameter('pocket_consumer_key'));
+        $pocket = $this->get('wallabag_import.import.pocket_import');
         $accessToken = $pocket->oAuthAuthorize();
         $pocket->import($accessToken);