Simplified transactional URL shortening

This commit is contained in:
Alejandro Celaya
2020-11-06 20:05:57 +01:00
parent 00255b04eb
commit 97f89bcede
11 changed files with 35 additions and 55 deletions

View File

@@ -31,7 +31,7 @@ abstract class AbstractCreateShortUrlAction extends AbstractRestAction
$tags = $shortUrlData->getTags();
$shortUrlMeta = $shortUrlData->getMeta();
$shortUrl = $this->urlShortener->urlToShortCode($longUrl, $tags, $shortUrlMeta);
$shortUrl = $this->urlShortener->shorten($longUrl, $tags, $shortUrlMeta);
$transformer = new ShortUrlDataTransformer($this->domainConfig);
return new JsonResponse($transformer->transform($shortUrl));