Created action to generate QR codes

This commit is contained in:
Alejandro Celaya
2016-08-09 10:24:42 +02:00
parent 166c94cac7
commit 99b7c77997
5 changed files with 161 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<?php
use Acelaya\ZsmAnnotatedServices\Factory\V3\AnnotatedFactory;
use Shlinkio\Shlink\Core\Action\RedirectAction;
use Shlinkio\Shlink\Core\Action;
use Shlinkio\Shlink\Core\Options\AppOptions;
use Shlinkio\Shlink\Core\Service;
@@ -17,7 +17,8 @@ return [
Service\VisitService::class => AnnotatedFactory::class,
// Middleware
RedirectAction::class => AnnotatedFactory::class,
Action\RedirectAction::class => AnnotatedFactory::class,
Action\QrCodeAction::class => AnnotatedFactory::class,
],
],

View File

@@ -1,5 +1,5 @@
<?php
use Shlinkio\Shlink\Core\Action\RedirectAction;
use Shlinkio\Shlink\Core\Action;
return [
@@ -7,7 +7,13 @@ return [
[
'name' => 'long-url-redirect',
'path' => '/{shortCode}',
'middleware' => RedirectAction::class,
'middleware' => Action\RedirectAction::class,
'allowed_methods' => ['GET'],
],
[
'name' => 'short-url-qr-code',
'path' => '/qr/{shortCode}[/{size:[0-9]+}]',
'middleware' => Action\QrCodeAction::class,
'allowed_methods' => ['GET'],
],
],