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