mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Standardized how the ShortUrlMeta object is created by exposing a single named constructor
This commit is contained in:
@@ -27,15 +27,7 @@ class CreateShortUrlAction extends AbstractCreateShortUrlAction
|
||||
]);
|
||||
}
|
||||
|
||||
$meta = ShortUrlMeta::createFromParams(
|
||||
$postData['validSince'] ?? null,
|
||||
$postData['validUntil'] ?? null,
|
||||
$postData['customSlug'] ?? null,
|
||||
$postData['maxVisits'] ?? null,
|
||||
$postData['findIfExists'] ?? null,
|
||||
$postData['domain'] ?? null,
|
||||
);
|
||||
|
||||
$meta = ShortUrlMeta::fromRawData($postData);
|
||||
return new CreateShortUrlData(new Uri($postData['longUrl']), (array) ($postData['tags'] ?? []), $meta);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user