2022-06-22 12:48:58 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Modules\Api\Rest\V1\Config;
|
|
|
|
|
2023-08-27 15:26:06 +02:00
|
|
|
use CodeIgniter\Router\RouteCollection;
|
|
|
|
|
|
|
|
/** @var RouteCollection $routes */
|
2022-06-22 12:48:58 +02:00
|
|
|
|
|
|
|
$routes->group(
|
2023-08-27 15:26:06 +02:00
|
|
|
config(RestApi::class)
|
2022-06-22 12:48:58 +02:00
|
|
|
->gateway . 'podcasts',
|
|
|
|
[
|
|
|
|
'namespace' => 'Modules\Api\Rest\V1\Controllers',
|
2023-06-12 16:47:38 +02:00
|
|
|
'filter' => 'rest-api',
|
2022-06-22 12:48:58 +02:00
|
|
|
],
|
2022-09-28 16:00:05 +02:00
|
|
|
static function ($routes): void {
|
2022-06-22 12:48:58 +02:00
|
|
|
$routes->get('/', 'PodcastController::list');
|
|
|
|
$routes->get('(:num)', 'PodcastController::view/$1');
|
|
|
|
$routes->get('(:any)', 'ExceptionController::notFound');
|
|
|
|
}
|
|
|
|
);
|
2023-06-21 12:07:31 +02:00
|
|
|
|
|
|
|
$routes->group(
|
2023-08-27 15:26:06 +02:00
|
|
|
config(RestApi::class)
|
2023-06-21 12:07:31 +02:00
|
|
|
->gateway . 'episodes',
|
|
|
|
[
|
|
|
|
'namespace' => 'Modules\Api\Rest\V1\Controllers',
|
|
|
|
'filter' => 'rest-api',
|
|
|
|
],
|
|
|
|
static function ($routes): void {
|
|
|
|
$routes->get('/', 'EpisodeController::list');
|
|
|
|
$routes->get('(:num)', 'EpisodeController::view/$1');
|
|
|
|
$routes->get('(:any)', 'ExceptionController::notFound');
|
|
|
|
}
|
|
|
|
);
|