Added valid_since and valid_until columns to shoirt_urls table

This commit is contained in:
Alejandro Celaya
2017-10-21 11:39:27 +02:00
parent 97a54aef06
commit 68b4cfbae0
5 changed files with 49 additions and 18 deletions

View File

@@ -7,8 +7,6 @@ use Interop\Http\ServerMiddleware\DelegateInterface;
use Interop\Http\ServerMiddleware\MiddlewareInterface;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Shlinkio\Shlink\Core\Action\Util\ErrorResponseBuilderTrait;
use Shlinkio\Shlink\Core\Exception\EntityDoesNotExistException;
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
@@ -28,19 +26,11 @@ class RedirectAction implements MiddlewareInterface
* @var VisitsTrackerInterface
*/
private $visitTracker;
/**
* @var null|LoggerInterface
*/
private $logger;
public function __construct(
UrlShortenerInterface $urlShortener,
VisitsTrackerInterface $visitTracker,
LoggerInterface $logger = null
) {
public function __construct(UrlShortenerInterface $urlShortener, VisitsTrackerInterface $visitTracker)
{
$this->urlShortener = $urlShortener;
$this->visitTracker = $visitTracker;
$this->logger = $logger ?: new NullLogger();
}
/**