diff options
Diffstat (limited to 'public/app/routes/api.php')
| -rw-r--r-- | public/app/routes/api.php | 28 |
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(); + + }); +} |
