mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-23 07:33:58 -06:00
43 lines
1.5 KiB
PHP
43 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
$contentNegotiationMiddleware = Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class;
|
|
$dropDomainMiddleware = Middleware\ShortUrl\DropDefaultDomainFromRequestMiddleware::class;
|
|
|
|
return [
|
|
|
|
'routes' => [
|
|
Action\HealthAction::getRouteDef(),
|
|
|
|
// Short codes
|
|
Action\ShortUrl\CreateShortUrlAction::getRouteDef([
|
|
$contentNegotiationMiddleware,
|
|
$dropDomainMiddleware,
|
|
Middleware\ShortUrl\DefaultShortCodesLengthMiddleware::class,
|
|
]),
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([$contentNegotiationMiddleware]),
|
|
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(),
|
|
|
|
// Tags
|
|
Action\Tag\ListTagsAction::getRouteDef(),
|
|
Action\Tag\DeleteTagsAction::getRouteDef(),
|
|
Action\Tag\CreateTagsAction::getRouteDef(),
|
|
Action\Tag\UpdateTagAction::getRouteDef(),
|
|
|
|
Action\MercureInfoAction::getRouteDef(),
|
|
],
|
|
|
|
];
|