2025-06-26 14:09:25 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Router\RouteCollection;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var RouteCollection $routes
|
|
|
|
|
*/
|
2025-07-16 10:00:02 +07:00
|
|
|
$routes->options('(:any)', function() {
|
|
|
|
|
return '';
|
|
|
|
|
});
|
2025-07-14 16:45:59 +07:00
|
|
|
$routes->get('/', 'Home::index');
|
2025-06-26 14:09:25 +07:00
|
|
|
|
|
|
|
|
$routes->post('/auth/login/', 'Auth::login');
|
|
|
|
|
$routes->post('/auth/change_pass/', 'Auth::change_pass');
|
|
|
|
|
$routes->post('/auth/register/', 'Auth::register');
|
2025-07-02 16:10:37 +07:00
|
|
|
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->get('/api/patient', 'Patient::index');
|
|
|
|
|
$routes->post('/api/patient', 'Patient::create');
|
2025-08-01 22:33:41 +07:00
|
|
|
$routes->get('/api/patient/(:num)', 'Patient::show/$1');
|
|
|
|
|
$routes->delete('/api/patient/(:num)', 'Patient::delete/$1');
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->patch('/api/patient/(:num)', 'Patient::update/$1');
|
2025-07-18 14:38:32 +07:00
|
|
|
|
2025-08-01 11:37:03 +07:00
|
|
|
$routes->get('/api/race', 'Race::index');
|
|
|
|
|
$routes->get('/api/country', 'Country::index');
|
|
|
|
|
$routes->get('/api/religion', 'Religion::index');
|
|
|
|
|
$routes->get('/api/ethnic', 'Ethnic::index');
|