Replaced UriInterface by string when creating a short URL

This commit is contained in:
Alejandro Celaya
2020-06-24 20:21:05 +02:00
parent a74e1df55c
commit 08950f6433
6 changed files with 18 additions and 37 deletions

View File

@@ -4,7 +4,6 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Rest\Action\ShortUrl;
use Laminas\Diactoros\Uri;
use Psr\Http\Message\ServerRequestInterface as Request;
use Shlinkio\Shlink\Core\Exception\ValidationException;
use Shlinkio\Shlink\Core\Model\CreateShortUrlData;
@@ -28,6 +27,6 @@ class CreateShortUrlAction extends AbstractCreateShortUrlAction
}
$meta = ShortUrlMeta::fromRawData($postData);
return new CreateShortUrlData(new Uri($postData['longUrl']), (array) ($postData['tags'] ?? []), $meta);
return new CreateShortUrlData($postData['longUrl'], (array) ($postData['tags'] ?? []), $meta);
}
}

View File

@@ -46,6 +46,6 @@ class SingleStepCreateShortUrlAction extends AbstractCreateShortUrlAction
]);
}
return new CreateShortUrlData(new Uri($query['longUrl']));
return new CreateShortUrlData($query['longUrl']);
}
}