2026-03-16 07:24:50 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Router\RouteCollection;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var RouteCollection $routes
|
|
|
|
|
*/
|
|
|
|
|
$routes->get('/', function () {
|
|
|
|
|
return "Backend Running";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->options('(:any)', function () {
|
|
|
|
|
return '';
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('api', ['filter' => 'auth'], function ($routes) {
|
2026-03-25 16:52:11 +07:00
|
|
|
$routes->get('dashboard', 'DashboardController::index');
|
|
|
|
|
$routes->get('sample', 'SampleController::index');
|
|
|
|
|
$routes->get('audit-logs', 'Audit\AuditLogController::index');
|
2026-03-16 07:24:50 +07:00
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
// Results CRUD
|
2026-04-08 08:37:41 +07:00
|
|
|
$routes->group('result', function ($routes) {
|
|
|
|
|
$routes->get('/', 'ResultController::index');
|
|
|
|
|
$routes->post('/', 'ResultController::create');
|
|
|
|
|
$routes->get('(:num)', 'ResultController::show/$1');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'ResultController::update/$1');
|
2026-04-08 08:37:41 +07:00
|
|
|
$routes->delete('(:num)', 'ResultController::delete/$1');
|
|
|
|
|
});
|
2026-03-16 07:24:50 +07:00
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
// Reports
|
|
|
|
|
$routes->get('report/(:num)', 'ReportController::view/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// V2 Auth API Routes (public - no auth required)
|
|
|
|
|
$routes->group('v2/auth', function ($routes) {
|
|
|
|
|
$routes->post('login', 'AuthV2Controller::login');
|
|
|
|
|
$routes->post('register', 'AuthV2Controller::register');
|
|
|
|
|
$routes->get('check', 'AuthV2Controller::checkAuth');
|
|
|
|
|
$routes->post('logout', 'AuthV2Controller::logout');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Faker
|
|
|
|
|
$routes->get('faker/faker-patient/(:num)', 'faker\FakerPatient::sendMany/$1');
|
|
|
|
|
|
|
|
|
|
$routes->group('api', function ($routes) {
|
|
|
|
|
// Auth
|
|
|
|
|
$routes->group('auth', function ($routes) {
|
|
|
|
|
$routes->post('login', 'AuthController::login');
|
|
|
|
|
$routes->post('change_pass', 'AuthController::change_pass');
|
|
|
|
|
$routes->post('register', 'AuthController::register');
|
|
|
|
|
$routes->get('check', 'AuthController::checkAuth');
|
|
|
|
|
$routes->post('logout', 'AuthController::logout');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Patient
|
|
|
|
|
$routes->group('patient', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Patient\PatientController::index');
|
|
|
|
|
$routes->post('/', 'Patient\PatientController::create');
|
|
|
|
|
$routes->get('(:num)', 'Patient\PatientController::show/$1');
|
|
|
|
|
$routes->delete('/', 'Patient\PatientController::delete');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Patient\PatientController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->get('check', 'Patient\PatientController::patientCheck');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// PatVisit
|
|
|
|
|
$routes->group('patvisit', function ($routes) {
|
|
|
|
|
$routes->get('/', 'PatVisitController::index');
|
|
|
|
|
$routes->post('/', 'PatVisitController::create');
|
|
|
|
|
$routes->get('patient/(:num)', 'PatVisitController::showByPatient/$1');
|
|
|
|
|
$routes->get('(:any)', 'PatVisitController::show/$1');
|
|
|
|
|
$routes->delete('/', 'PatVisitController::delete');
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->patch('(:any)', 'PatVisitController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('patvisitadt', function ($routes) {
|
|
|
|
|
$routes->get('visit/(:num)', 'PatVisitController::getADTByVisit/$1');
|
|
|
|
|
$routes->get('(:num)', 'PatVisitController::showADT/$1');
|
|
|
|
|
$routes->post('/', 'PatVisitController::createADT');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'PatVisitController::updateADT/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'PatVisitController::deleteADT');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Master Data
|
|
|
|
|
|
|
|
|
|
// Location
|
|
|
|
|
$routes->group('location', function ($routes) {
|
|
|
|
|
$routes->get('/', 'LocationController::index');
|
|
|
|
|
$routes->get('(:num)', 'LocationController::show/$1');
|
|
|
|
|
$routes->post('/', 'LocationController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'LocationController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'LocationController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Contact
|
|
|
|
|
$routes->group('contact', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Contact\ContactController::index');
|
|
|
|
|
$routes->get('(:num)', 'Contact\ContactController::show/$1');
|
|
|
|
|
$routes->post('/', 'Contact\ContactController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Contact\ContactController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Contact\ContactController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('occupation', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Contact\OccupationController::index');
|
|
|
|
|
$routes->get('(:num)', 'Contact\OccupationController::show/$1');
|
|
|
|
|
$routes->post('/', 'Contact\OccupationController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Contact\OccupationController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
//$routes->delete('/', 'Contact\OccupationController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('medicalspecialty', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Contact\MedicalSpecialtyController::index');
|
|
|
|
|
$routes->get('(:num)', 'Contact\MedicalSpecialtyController::show/$1');
|
|
|
|
|
$routes->post('/', 'Contact\MedicalSpecialtyController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Contact\MedicalSpecialtyController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Lib ValueSet (file-based)
|
|
|
|
|
$routes->group('valueset', function ($routes) {
|
|
|
|
|
$routes->get('/', 'ValueSetController::index');
|
|
|
|
|
$routes->get('(:any)', 'ValueSetController::index/$1');
|
|
|
|
|
$routes->post('refresh', 'ValueSetController::refresh');
|
|
|
|
|
|
|
|
|
|
// User ValueSet (database-based)
|
|
|
|
|
$routes->group('user', function ($routes) {
|
|
|
|
|
$routes->group('items', function ($routes) {
|
|
|
|
|
$routes->get('/', 'ValueSetController::items');
|
|
|
|
|
$routes->get('(:num)', 'ValueSetController::showItem/$1');
|
|
|
|
|
$routes->post('/', 'ValueSetController::createItem');
|
|
|
|
|
$routes->put('(:num)', 'ValueSetController::updateItem/$1');
|
|
|
|
|
$routes->delete('(:num)', 'ValueSetController::deleteItem/$1');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('def', function ($routes) {
|
|
|
|
|
$routes->get('/', 'ValueSetDefController::index');
|
|
|
|
|
$routes->get('(:num)', 'ValueSetDefController::show/$1');
|
|
|
|
|
$routes->post('/', 'ValueSetDefController::create');
|
|
|
|
|
$routes->put('(:num)', 'ValueSetDefController::update/$1');
|
|
|
|
|
$routes->delete('(:num)', 'ValueSetDefController::delete/$1');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Result ValueSet
|
|
|
|
|
$routes->group('result', function ($routes) {
|
|
|
|
|
$routes->group('valueset', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Result\ResultValueSetController::index');
|
|
|
|
|
$routes->get('(:num)', 'Result\ResultValueSetController::show/$1');
|
|
|
|
|
$routes->post('/', 'Result\ResultValueSetController::create');
|
|
|
|
|
$routes->put('(:num)', 'Result\ResultValueSetController::update/$1');
|
|
|
|
|
$routes->delete('(:num)', 'Result\ResultValueSetController::delete/$1');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->post('calc/testsite/(:num)', 'CalculatorController::calculateByTestSite/$1');
|
|
|
|
|
$routes->post('calc/testcode/(:any)', 'CalculatorController::calculateByCodeOrName/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// Counter
|
|
|
|
|
$routes->group('counter', function ($routes) {
|
|
|
|
|
$routes->get('/', 'CounterController::index');
|
|
|
|
|
$routes->get('(:num)', 'CounterController::show/$1');
|
|
|
|
|
$routes->post('/', 'CounterController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'CounterController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'CounterController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// AreaGeo
|
|
|
|
|
$routes->group('areageo', function ($routes) {
|
|
|
|
|
$routes->get('/', 'AreaGeoController::index');
|
|
|
|
|
$routes->get('provinces', 'AreaGeoController::getProvinces');
|
|
|
|
|
$routes->get('cities', 'AreaGeoController::getCities');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Organization
|
|
|
|
|
$routes->group('organization', function ($routes) {
|
|
|
|
|
// Account
|
|
|
|
|
$routes->group('account', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\AccountController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\AccountController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\AccountController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\AccountController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\AccountController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Site
|
|
|
|
|
$routes->group('site', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\SiteController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\SiteController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\SiteController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\SiteController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\SiteController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Discipline
|
|
|
|
|
$routes->group('discipline', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\DisciplineController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\DisciplineController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\DisciplineController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\DisciplineController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\DisciplineController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Department
|
|
|
|
|
$routes->group('department', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\DepartmentController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\DepartmentController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\DepartmentController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\DepartmentController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\DepartmentController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Workstation
|
|
|
|
|
$routes->group('workstation', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\WorkstationController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\WorkstationController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\WorkstationController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\WorkstationController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\WorkstationController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
2026-04-08 16:07:19 +07:00
|
|
|
// HostApp
|
|
|
|
|
$routes->group('hostapp', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\HostAppController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\HostAppController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\HostAppController::create');
|
|
|
|
|
$routes->patch('(:num)', 'Organization\HostAppController::update/$1');
|
|
|
|
|
$routes->delete('/', 'Organization\HostAppController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// HostComPara
|
|
|
|
|
$routes->group('hostcompara', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\HostComParaController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\HostComParaController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\HostComParaController::create');
|
|
|
|
|
$routes->patch('(:num)', 'Organization\HostComParaController::update/$1');
|
|
|
|
|
$routes->delete('/', 'Organization\HostComParaController::delete');
|
|
|
|
|
});
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// CodingSys
|
|
|
|
|
$routes->group('codingsys', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Organization\CodingSysController::index');
|
|
|
|
|
$routes->get('(:num)', 'Organization\CodingSysController::show/$1');
|
|
|
|
|
$routes->post('/', 'Organization\CodingSysController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Organization\CodingSysController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Organization\CodingSysController::delete');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Infrastructure
|
|
|
|
|
$routes->group('equipmentlist', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Infrastructure\EquipmentListController::index');
|
|
|
|
|
$routes->get('(:num)', 'Infrastructure\EquipmentListController::show/$1');
|
|
|
|
|
$routes->post('/', 'Infrastructure\EquipmentListController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Infrastructure\EquipmentListController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Infrastructure\EquipmentListController::delete');
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
// Users
|
|
|
|
|
$routes->group('user', function ($routes) {
|
|
|
|
|
$routes->get('/', 'User\UserController::index');
|
|
|
|
|
$routes->get('(:num)', 'User\UserController::show/$1');
|
|
|
|
|
$routes->post('/', 'User\UserController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'User\UserController::update/$1');
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->delete('(:num)', 'User\UserController::delete/$1');
|
|
|
|
|
});
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// Specimen
|
|
|
|
|
$routes->group('specimen', function ($routes) {
|
|
|
|
|
// Container aliases - 'container' and 'containerdef' both point to ContainerDefController
|
|
|
|
|
$routes->group('container', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Specimen\ContainerDefController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\ContainerDefController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\ContainerDefController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\ContainerDefController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
$routes->group('containerdef', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Specimen\ContainerDefController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\ContainerDefController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\ContainerDefController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\ContainerDefController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('prep', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Specimen\SpecimenPrepController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\SpecimenPrepController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\SpecimenPrepController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\SpecimenPrepController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('status', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Specimen\SpecimenStatusController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\SpecimenStatusController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\SpecimenStatusController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\SpecimenStatusController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->group('collection', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Specimen\SpecimenCollectionController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\SpecimenCollectionController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\SpecimenCollectionController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\SpecimenCollectionController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$routes->get('/', 'Specimen\SpecimenController::index');
|
|
|
|
|
$routes->get('(:num)', 'Specimen\SpecimenController::show/$1');
|
|
|
|
|
$routes->post('/', 'Specimen\SpecimenController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Specimen\SpecimenController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('(:num)', 'Specimen\SpecimenController::delete/$1');
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
// Test
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->group('test', function ($routes) {
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->get('/', 'Test\TestsController::index');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->get('(:num)', 'Test\TestsController::show/$1');
|
|
|
|
|
$routes->post('/', 'Test\TestsController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Test\TestsController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->group('testmap', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Test\TestMapController::index');
|
|
|
|
|
$routes->get('(:num)', 'Test\TestMapController::show/$1');
|
|
|
|
|
$routes->post('/', 'Test\TestMapController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Test\TestMapController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Test\TestMapController::delete');
|
|
|
|
|
|
|
|
|
|
// Filter routes
|
|
|
|
|
$routes->get('by-testcode/(:any)', 'Test\TestMapController::showByTestCode/$1');
|
|
|
|
|
|
|
|
|
|
// TestMapDetail nested routes
|
|
|
|
|
$routes->group('detail', function ($routes) {
|
|
|
|
|
$routes->get('/', 'Test\TestMapDetailController::index');
|
|
|
|
|
$routes->get('(:num)', 'Test\TestMapDetailController::show/$1');
|
|
|
|
|
$routes->post('/', 'Test\TestMapDetailController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Test\TestMapDetailController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'Test\TestMapDetailController::delete');
|
|
|
|
|
$routes->get('by-testmap/(:num)', 'Test\TestMapDetailController::showByTestMap/$1');
|
|
|
|
|
$routes->post('batch', 'Test\TestMapDetailController::batchCreate');
|
|
|
|
|
$routes->patch('batch', 'Test\TestMapDetailController::batchUpdate');
|
|
|
|
|
$routes->delete('batch', 'Test\TestMapDetailController::batchDelete');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Orders
|
|
|
|
|
$routes->group('ordertest', function ($routes) {
|
|
|
|
|
$routes->get('/', 'OrderTestController::index');
|
|
|
|
|
$routes->get('(:any)', 'OrderTestController::show/$1');
|
|
|
|
|
$routes->post('/', 'OrderTestController::create');
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->patch('(:any)', 'OrderTestController::update/$1');
|
2026-03-16 07:24:50 +07:00
|
|
|
$routes->delete('/', 'OrderTestController::delete');
|
|
|
|
|
$routes->post('status', 'OrderTestController::updateStatus');
|
|
|
|
|
});
|
|
|
|
|
|
2026-03-17 16:50:57 +07:00
|
|
|
// Rules
|
|
|
|
|
$routes->group('rule', ['filter' => 'auth'], function ($routes) {
|
2026-03-16 15:58:56 +07:00
|
|
|
$routes->get('/', 'Rule\RuleController::index');
|
|
|
|
|
$routes->get('(:num)', 'Rule\RuleController::show/$1');
|
|
|
|
|
$routes->post('/', 'Rule\RuleController::create');
|
2026-04-08 06:54:50 +07:00
|
|
|
$routes->patch('(:any)', 'Rule\RuleController::update/$1');
|
2026-03-12 06:34:56 +07:00
|
|
|
$routes->delete('(:num)', 'Rule\RuleController::delete/$1');
|
|
|
|
|
$routes->post('validate', 'Rule\RuleController::validateExpr');
|
2026-03-12 16:55:03 +07:00
|
|
|
$routes->post('compile', 'Rule\RuleController::compile');
|
2025-12-30 08:48:13 +07:00
|
|
|
});
|
2026-03-17 16:50:57 +07:00
|
|
|
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// Demo/Test Routes (No Auth)
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->group('api/demo', function ($routes) {
|
|
|
|
|
$routes->post('order', 'Test\DemoOrderController::createDemoOrder');
|
|
|
|
|
$routes->get('order', 'Test\DemoOrderController::listDemoOrders');
|
|
|
|
|
});
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// Edge API - Integration with tiny-edge
|
2026-03-17 16:50:57 +07:00
|
|
|
$routes->group('edge', function ($routes) {
|
|
|
|
|
$routes->post('result', 'EdgeController::results');
|
|
|
|
|
$routes->get('order', 'EdgeController::orders');
|
|
|
|
|
$routes->post('order/(:num)/ack', 'EdgeController::ack/$1');
|
|
|
|
|
$routes->post('status', 'EdgeController::status');
|
|
|
|
|
});
|
|
|
|
|
});
|
2026-03-16 07:24:50 +07:00
|
|
|
|
|
|
|
|
// Khusus
|
|
|
|
|
/*
|
|
|
|
|
$routes->get('/api/zones', 'Zones::index');
|
|
|
|
|
$routes->get('/api/zones/synchronize', 'Zones::synchronize');
|
|
|
|
|
$routes->get('/api/zones/provinces', 'Zones::getProvinces');
|
|
|
|
|
$routes->get('/api/zones/cities', 'Zones::getCities');
|
|
|
|
|
*/
|
|
|
|
|
|