Merge branch 'mod/core_update' into 'main'

Mod/core update

See merge request jjimenez/safekat!230
This commit is contained in:
Ignacio Martinez Navajas
2024-05-07 08:17:21 +00:00
266 changed files with 6544 additions and 10103 deletions

View File

@ -1,28 +1,13 @@
<?php
namespace Config;
use CodeIgniter\Router\RouteCollection;
// Create a new instance of our RouteCollection class.
$routes = Services::routes();
// Load the system's routing file first, so that the app and ENVIRONMENT
// can override as needed.
if (file_exists(SYSTEMPATH . 'Config/Routes.php')) {
require SYSTEMPATH . 'Config/Routes.php';
}
/*
* --------------------------------------------------------------------
* Router Setup
* --------------------------------------------------------------------
/**
* @var RouteCollection $routes
*/
$routes->setDefaultNamespace('App\Controllers');
$routes->setDefaultController('Home');
$routes->setDefaultMethod('index');
$routes->setTranslateURIDashes(false);
$routes->set404Override();
$routes->setAutoRoute(true);
//service('auth')->routes($routes, ['except' => ['login', 'register']]);
service('auth')->routes($routes);
//WEB ROUTER ------------------------------------------------------
//------------------------------------------------------------------
@ -30,19 +15,16 @@ $routes->get('/', 'Home::index');
$routes->get('lang/{locale}', 'Language::index');
$routes->get('viewmode/(:alpha)', 'Viewmode::index/$1');
//API ROUTER ------------------------------------------------------
//------------------------------------------------------------------
$routes->get('api/', 'Api::index');
$routes->get('api/status', 'Api::status');
$routes->post('api/signIn', 'Api::signIn');
//API ROUTER USER ------------------------------------------------------
//------------------------------------------------------------------
$routes->get('api/user/', 'Api::user/all');
$routes->get('api/user/(:segment)', 'Api::user/id/$1');
$routes->post('api/user/', 'Api::user/add');
$routes->put('api/user/(:segment)', 'Api::user/edit/$1');
$routes->delete('api/user/(:segment)', 'Api::user/delete/$1');
$routes->group('activity', ['namespace' => 'App\Controllers\Sistema'], function ($routes) {
$routes->get('', 'Actividad::index', ['as' => 'activityList']);
$routes->post('datatable', 'Actividad::datatable', ['as' => 'dataTableOfActividad']);
});
$routes->group('settings', ['namespace' => 'App\Controllers\Sistema'], function ($routes) {
$routes->get('', 'Ajustes::settings', ['as' => 'settingsEdit']);
$routes->post('', 'Ajustes::settings', ['as' => 'settingsPost']);
});
/*