mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 13:49:03 +03:00
52 lines
1.9 KiB
PHP
52 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
$contentNegotiationMiddleware = Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class;
|
|
$dropDomainMiddleware = Middleware\ShortUrl\DropDefaultDomainFromRequestMiddleware::class;
|
|
$overrideDomainMiddleware = Middleware\ShortUrl\OverrideDomainMiddleware::class;
|
|
|
|
return [
|
|
|
|
'routes' => [
|
|
Action\HealthAction::getRouteDef(),
|
|
|
|
// Short URLs
|
|
Action\ShortUrl\CreateShortUrlAction::getRouteDef([
|
|
$contentNegotiationMiddleware,
|
|
$dropDomainMiddleware,
|
|
$overrideDomainMiddleware,
|
|
Middleware\ShortUrl\DefaultShortCodesLengthMiddleware::class,
|
|
]),
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([
|
|
$contentNegotiationMiddleware,
|
|
$overrideDomainMiddleware,
|
|
]),
|
|
Action\ShortUrl\EditShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
|
Action\ShortUrl\DeleteShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
|
Action\ShortUrl\ResolveShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
|
Action\ShortUrl\ListShortUrlsAction::getRouteDef(),
|
|
Action\ShortUrl\EditShortUrlTagsAction::getRouteDef([$dropDomainMiddleware]),
|
|
|
|
// Visits
|
|
Action\Visit\ShortUrlVisitsAction::getRouteDef([$dropDomainMiddleware]),
|
|
Action\Visit\TagVisitsAction::getRouteDef(),
|
|
Action\Visit\GlobalVisitsAction::getRouteDef(),
|
|
Action\Visit\OrphanVisitsAction::getRouteDef(),
|
|
|
|
// Tags
|
|
Action\Tag\ListTagsAction::getRouteDef(),
|
|
Action\Tag\DeleteTagsAction::getRouteDef(),
|
|
Action\Tag\CreateTagsAction::getRouteDef(),
|
|
Action\Tag\UpdateTagAction::getRouteDef(),
|
|
|
|
// Domains
|
|
Action\Domain\ListDomainsAction::getRouteDef(),
|
|
Action\Domain\DomainRedirectsAction::getRouteDef(),
|
|
|
|
Action\MercureInfoAction::getRouteDef(),
|
|
],
|
|
|
|
];
|