mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Replaced UriInterface by string when creating a short URL
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,6 @@ class SingleStepCreateShortUrlAction extends AbstractCreateShortUrlAction
|
||||
]);
|
||||
}
|
||||
|
||||
return new CreateShortUrlData(new Uri($query['longUrl']));
|
||||
return new CreateShortUrlData($query['longUrl']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user