2016-07-19 18:07:59 +03:00
|
|
|
<?php
|
2019-10-05 18:26:10 +03:00
|
|
|
|
2017-10-12 11:13:20 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-05-03 19:26:31 +03:00
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
|
2020-02-08 14:22:07 +03:00
|
|
|
$contentNegotiationMiddleware = Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class;
|
|
|
|
$dropDomainMiddleware = Middleware\ShortUrl\DropDefaultDomainFromRequestMiddleware::class;
|
2021-01-04 22:15:42 +03:00
|
|
|
$overrideDomainMiddleware = Middleware\ShortUrl\OverrideDomainMiddleware::class;
|
2020-02-02 21:03:43 +03:00
|
|
|
|
2016-07-19 18:07:59 +03:00
|
|
|
return [
|
|
|
|
|
|
|
|
'routes' => [
|
2018-12-23 12:18:38 +03:00
|
|
|
Action\HealthAction::getRouteDef(),
|
2017-07-07 14:12:45 +03:00
|
|
|
|
2020-09-27 10:53:12 +03:00
|
|
|
// Short URLs
|
2020-02-18 21:21:34 +03:00
|
|
|
Action\ShortUrl\CreateShortUrlAction::getRouteDef([
|
|
|
|
$contentNegotiationMiddleware,
|
|
|
|
$dropDomainMiddleware,
|
2021-01-04 22:15:42 +03:00
|
|
|
$overrideDomainMiddleware,
|
2020-02-18 21:21:34 +03:00
|
|
|
Middleware\ShortUrl\DefaultShortCodesLengthMiddleware::class,
|
|
|
|
]),
|
2021-01-04 22:15:42 +03:00
|
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::getRouteDef([
|
|
|
|
$contentNegotiationMiddleware,
|
|
|
|
$overrideDomainMiddleware,
|
|
|
|
]),
|
2020-02-08 14:22:07 +03:00
|
|
|
Action\ShortUrl\EditShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
|
|
|
Action\ShortUrl\DeleteShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
|
|
|
Action\ShortUrl\ResolveShortUrlAction::getRouteDef([$dropDomainMiddleware]),
|
2018-09-20 20:55:24 +03:00
|
|
|
Action\ShortUrl\ListShortUrlsAction::getRouteDef(),
|
2020-02-08 14:22:07 +03:00
|
|
|
Action\ShortUrl\EditShortUrlTagsAction::getRouteDef([$dropDomainMiddleware]),
|
2017-07-07 14:12:45 +03:00
|
|
|
|
|
|
|
// Visits
|
2020-05-01 12:17:07 +03:00
|
|
|
Action\Visit\ShortUrlVisitsAction::getRouteDef([$dropDomainMiddleware]),
|
2020-05-09 10:53:45 +03:00
|
|
|
Action\Visit\TagVisitsAction::getRouteDef(),
|
2020-05-01 12:40:02 +03:00
|
|
|
Action\Visit\GlobalVisitsAction::getRouteDef(),
|
2021-02-10 00:11:09 +03:00
|
|
|
Action\Visit\OrphanVisitsAction::getRouteDef(),
|
2017-07-07 14:12:45 +03:00
|
|
|
|
|
|
|
// Tags
|
2018-05-01 19:28:37 +03:00
|
|
|
Action\Tag\ListTagsAction::getRouteDef(),
|
|
|
|
Action\Tag\DeleteTagsAction::getRouteDef(),
|
|
|
|
Action\Tag\CreateTagsAction::getRouteDef(),
|
|
|
|
Action\Tag\UpdateTagAction::getRouteDef(),
|
2020-04-12 14:59:10 +03:00
|
|
|
|
2020-09-27 10:53:12 +03:00
|
|
|
// Domains
|
|
|
|
Action\Domain\ListDomainsAction::getRouteDef(),
|
2021-07-30 19:53:57 +03:00
|
|
|
Action\Domain\DomainRedirectsAction::getRouteDef(),
|
2020-09-27 10:53:12 +03:00
|
|
|
|
2020-04-12 15:19:51 +03:00
|
|
|
Action\MercureInfoAction::getRouteDef(),
|
2016-07-19 18:07:59 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|