Removed hardcoded route names for core routes and used action class names instead

This commit is contained in:
Alejandro Celaya
2019-11-02 18:36:15 +01:00
parent eeb5306883
commit 01f60614ef
4 changed files with 8 additions and 6 deletions

View File

@@ -68,7 +68,7 @@ class QrCodeAction implements MiddlewareInterface
return $this->buildErrorResponse($request, $handler);
}
$path = $this->router->generateUri('long-url-redirect', ['shortCode' => $shortCode]);
$path = $this->router->generateUri(RedirectAction::class, ['shortCode' => $shortCode]);
$size = $this->getSizeParam($request);
$qrCode = new QrCode((string) $request->getUri()->withPath($path)->withQuery(''));