clqms-be/app/Config/Routes.php
2025-08-14 09:17:15 +07:00

34 lines
1.1 KiB
PHP

<?php
use CodeIgniter\Router\RouteCollection;
/**
* @var RouteCollection $routes
*/
$routes->options('(:any)', function() {
return '';
});
$routes->get('/', 'Home::index');
$routes->post('/auth/login/', 'Auth::login');
$routes->post('/auth/change_pass/', 'Auth::change_pass');
$routes->post('/auth/register/', 'Auth::register');
$routes->get('/api/patient', 'Patient::index');
$routes->post('/api/patient', 'Patient::create');
$routes->get('/api/patient/(:num)', 'Patient::show/$1');
$routes->delete('/api/patient/(:num)', 'Patient::delete/$1');
$routes->patch('/api/patient/(:num)', 'Patient::update/$1');
$routes->patch('/api/patient/patid-check/(:any)', 'Patient::patientIdCheck/$1');
$routes->get('/api/race', 'Race::index');
$routes->get('/api/race/(:num)', 'Race::show/$1');
$routes->get('/api/country', 'Country::index');
$routes->get('/api/country/(:num)', 'Country::show/$1');
$routes->get('/api/religion', 'Religion::index');
$routes->get('/api/religion/(:num)', 'Religion::show/$1');
$routes->get('/api/ethnic', 'Ethnic::index');
$routes->get('/api/ethnic/(:num)', 'Ethnic::show/$1');