Merge branch 'main' into 'mod/presupuesto_admin'

Main

See merge request jjimenez/safekat!474
This commit is contained in:
2025-01-16 18:31:08 +00:00
5 changed files with 228 additions and 5 deletions

View File

@ -26,6 +26,7 @@ class Filters extends BaseConfig
'honeypot' => Honeypot::class,
'invalidchars' => InvalidChars::class,
'secureheaders' => SecureHeaders::class,
'cors' => \App\Filters\Cors::class
];
/**

View File

@ -945,14 +945,31 @@ $routes->group('produccion', ['namespace' => 'App\Controllers\Produccion'], func
*/
$routes->post('auth/jwt', '\App\Controllers\Sistema\AuthAPIController::jwtLogin');
$routes->group('api', ['filter' => 'jwt'], static function ($routes) {
$routes->get('test', 'Test::echo');
// ...
});
$routes->group(
'api',
[
'namespace' => 'App\Controllers\API',
'filter' => 'jwt'
],
static function ($routes) {
$routes->resource('items', [
'controller' => 'ItemsController',
'filter' => 'cors'
]);
$routes->options('items', static function () { });
$routes->options('items/(:any)', static function () { });
// ...
}
);
/*
* --------------------------------------------------------------------
* Translation
* Translation
* --------------------------------------------------------------------
*/
$routes->group('translate', ['namespace' => 'App\Controllers'], function ($routes) {