summaryrefslogtreecommitdiff
path: root/public/app/routes
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/routes')
-rw-r--r--public/app/routes/api.php29
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();
+
+ });
+}