summaryrefslogtreecommitdiff
path: root/public/app/routes/api.php
diff options
context:
space:
mode:
authorGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-08 17:21:17 +0300
committerGeo Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-05-08 17:21:17 +0300
commitd5936455d6d5d32a5e0ca88096d663bade444549 (patch)
treea3afef704c64c2b2133c0e6408c997f86c6731aa /public/app/routes/api.php
parent7e22b5bc5328652ae7e91ad799b48820474660ed (diff)
downloadgyraf1gov-d5936455d6d5d32a5e0ca88096d663bade444549.tar.gz
gyraf1gov-d5936455d6d5d32a5e0ca88096d663bade444549.tar.bz2
gyraf1gov-d5936455d6d5d32a5e0ca88096d663bade444549.zip
refactoring anom-parametres setup
Diffstat (limited to 'public/app/routes/api.php')
-rw-r--r--public/app/routes/api.php28
1 files changed, 11 insertions, 17 deletions
diff --git a/public/app/routes/api.php b/public/app/routes/api.php
index 61e485b..94ae2a6 100644
--- a/public/app/routes/api.php
+++ b/public/app/routes/api.php
@@ -61,21 +61,15 @@ Route::add('/api/([0-9a-zA-Z-_]*)/([0-9]*)',
* -----------------------------------------------------------------------------
*
* direct calls to simple tests
- *
+ * (not on production environment)
*/
-
-
-// route for testing...
-// ---
-Route::add('/test/([0-9a-zA-Z-_\/]*)', function($test) {
-
- // TODO:
- // hide tests from production
-
- if (file_exists(TESTS_DIRECTORY . $test .'.php')) {
- if (!Benchmark::exist('start')) Benchmark::add_spot('start');
- require(TESTS_DIRECTORY . $test .'.php');
- } else { echo "Test {$test} not exist";
- } die();
-
-});
+ if (!PRODUCTION) {
+ Route::add('/test/([0-9a-zA-Z-_\/]*)', function($test) {
+ if (file_exists(TESTS_DIRECTORY . $test .'.php')) {
+ if (!Benchmark::exist('start')) Benchmark::add_spot('start');
+ require(TESTS_DIRECTORY . $test .'.php');
+ } else { echo "Test {$test} not exist";
+ } die();
+
+ });
+}