From 59cd40235bf4746a119421609b25d7e9b7f65f83 Mon Sep 17 00:00:00 2001 From: Geo Halkiadakis Date: Mon, 15 May 2023 18:15:37 +0300 Subject: refactoring framework defaults --- public/app/routes/api.php | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'public/app/routes/api.php') diff --git a/public/app/routes/api.php b/public/app/routes/api.php index 94ae2a6..dd0fecf 100644 --- a/public/app/routes/api.php +++ b/public/app/routes/api.php @@ -12,33 +12,29 @@ use app\controllers\api\Doc_api; */ -// api: tree of product-categories -Route::add('/api/tree', - function() { Doc_api::tree(); }, - 'get' -); +// depricated: (not needed) // api: database documentation -Route::add('/api/doc', - function() { Doc_api::dbDoc(); }, - 'get' -); - -Route::add('/api/url/([0-9a-zA-Z-_\/]*)', - function($url) { Common_api::category_by_url($url); } -); - -// route: /api/table -Route::add('/api/([0-9a-zA-Z-_]*)', - function($table) { Common_api::table($table); }, - 'get' -); - -// route: /api/table/{id} -Route::add('/api/([0-9a-zA-Z-_]*)/([0-9]*)', - function($table, $id) { Common_api::record($table, $id); }, - 'get' -); +// Route::add('/api/doc', +// function() { Doc_api::dbDoc(); }, +// 'get' +// ); +// +// Route::add('/api/url/([0-9a-zA-Z-_\/]*)', +// function($url) { Common_api::category_by_url($url); } +// ); +// +// // route: /api/table +// Route::add('/api/([0-9a-zA-Z-_]*)', +// function($table) { Common_api::table($table); }, +// 'get' +// ); +// +// // route: /api/table/{id} +// Route::add('/api/([0-9a-zA-Z-_]*)/([0-9]*)', +// function($table, $id) { Common_api::record($table, $id); }, +// 'get' +// ); -- cgit v1.2.3