shlink/module/Rest/config/routes.config.php

40 lines
1.2 KiB
PHP
Raw Normal View History

2016-07-19 18:07:59 +03:00
<?php
use Shlinkio\Shlink\Rest\Action;
return [
'routes' => [
[
'name' => 'rest-authenticate',
'path' => '/rest/authenticate',
'middleware' => Action\AuthenticateMiddleware::class,
'allowed_methods' => ['POST', 'OPTIONS'],
],
[
'name' => 'rest-create-shortcode',
'path' => '/rest/short-codes',
'middleware' => Action\CreateShortcodeMiddleware::class,
'allowed_methods' => ['POST', 'OPTIONS'],
],
[
'name' => 'rest-resolve-url',
'path' => '/rest/short-codes/{shortCode}',
'middleware' => Action\ResolveUrlMiddleware::class,
'allowed_methods' => ['GET', 'OPTIONS'],
],
[
'name' => 'rest-list-shortened-url',
2016-07-19 18:07:59 +03:00
'path' => '/rest/short-codes',
'middleware' => Action\ListShortcodesMiddleware::class,
'allowed_methods' => ['GET'],
],
[
'name' => 'rest-get-visits',
2016-07-21 11:16:36 +03:00
'path' => '/rest/short-codes/{shortCode}/visits',
2016-07-19 18:07:59 +03:00
'middleware' => Action\GetVisitsMiddleware::class,
'allowed_methods' => ['GET', 'OPTIONS'],
],
],
];