diff options
| author | Geo Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-08 17:22:09 +0300 |
|---|---|---|
| committer | Geo Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-08 17:22:09 +0300 |
| commit | 9aebaab3a198fcc5334119bdbef10750e08878ae (patch) | |
| tree | 0da3869fa26fd5400cf98ae5c1956c892faf10a5 /public/app/routes/api.php | |
| parent | 05e696a139b543c70025082257d413718c31a9dc (diff) | |
| download | classroom-9aebaab3a198fcc5334119bdbef10750e08878ae.tar.gz classroom-9aebaab3a198fcc5334119bdbef10750e08878ae.tar.bz2 classroom-9aebaab3a198fcc5334119bdbef10750e08878ae.zip | |
refactoring anom-parametres setupmaster
Diffstat (limited to 'public/app/routes/api.php')
| -rw-r--r-- | public/app/routes/api.php | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/public/app/routes/api.php b/public/app/routes/api.php index 61e485b..80676ff 100644 --- a/public/app/routes/api.php +++ b/public/app/routes/api.php @@ -56,26 +56,19 @@ Route::add('/api/([0-9a-zA-Z-_]*)/([0-9]*)', - /** TEST CALLS * ----------------------------------------------------------------------------- * * 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(); + + }); +} |
