1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-12 16:58:37 +00:00

Update url & service name

Prefix ur with service namel: [service]_[route name]
Add comment in Interface
This commit is contained in:
Jeremy Benoist 2015-12-24 15:22:56 +01:00
parent 5a4bbcc9a7
commit 0aa344dc24
6 changed files with 56 additions and 13 deletions

View file

@ -8,7 +8,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class PocketController extends Controller
{
/**
* @Route("/import/pocket", name="pocket")
* @Route("/import/pocket", name="pocket_import")
*/
public function indexAction()
{
@ -16,22 +16,25 @@ class PocketController extends Controller
}
/**
* @Route("/import/pocket/auth", 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("/import/pocket/callback", 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);