mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 16:53:11 +08:00
Created action to generate QR codes
This commit is contained in:
@@ -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,
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
@@ -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'],
|
||||
],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user