mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Deleted deprecated constant
This commit is contained in:
@@ -38,15 +38,11 @@ abstract class AbstractCreateShortUrlAction extends AbstractRestAction
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
try {
|
||||
$shortUrlData = $this->buildShortUrlData($request);
|
||||
$shortUrlMeta = $shortUrlData->getMeta();
|
||||
$longUrl = $shortUrlData->getLongUrl();
|
||||
$customSlug = $shortUrlMeta->getCustomSlug();
|
||||
} catch (InvalidArgumentException $e) {
|
||||
$this->logger->warning('Provided data is invalid. {e}', ['e' => $e]);
|
||||
return new JsonResponse([
|
||||
@@ -55,6 +51,10 @@ abstract class AbstractCreateShortUrlAction extends AbstractRestAction
|
||||
], self::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$longUrl = $shortUrlData->getLongUrl();
|
||||
$shortUrlMeta = $shortUrlData->getMeta();
|
||||
$customSlug = $shortUrlMeta->getCustomSlug();
|
||||
|
||||
try {
|
||||
$shortUrl = $this->urlShortener->urlToShortCode(
|
||||
$longUrl,
|
||||
|
||||
Reference in New Issue
Block a user