mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 09:43:13 +08:00
Update ShortUrlRedirectionBuilder to accept a request object instead of a raw query array
This commit is contained in:
@@ -18,15 +18,15 @@ class RedirectAction extends AbstractTrackingAction implements StatusCodeInterfa
|
||||
public function __construct(
|
||||
ShortUrlResolverInterface $urlResolver,
|
||||
RequestTrackerInterface $requestTracker,
|
||||
private ShortUrlRedirectionBuilderInterface $redirectionBuilder,
|
||||
private RedirectResponseHelperInterface $redirectResponseHelper,
|
||||
private readonly ShortUrlRedirectionBuilderInterface $redirectionBuilder,
|
||||
private readonly RedirectResponseHelperInterface $redirectResponseHelper,
|
||||
) {
|
||||
parent::__construct($urlResolver, $requestTracker);
|
||||
}
|
||||
|
||||
protected function createSuccessResp(ShortUrl $shortUrl, ServerRequestInterface $request): Response
|
||||
{
|
||||
$longUrl = $this->redirectionBuilder->buildShortUrlRedirect($shortUrl, $request->getQueryParams());
|
||||
$longUrl = $this->redirectionBuilder->buildShortUrlRedirect($shortUrl, $request);
|
||||
return $this->redirectResponseHelper->buildRedirectResponse($longUrl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user