From 7076343338ae3439f3c86f01144818abe8c31978 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Sun, 12 Mar 2023 07:16:23 +0200 Subject: add container helpers; constuct public directory-tree --- html/app/routes/api.php | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 html/app/routes/api.php (limited to 'html/app/routes/api.php') diff --git a/html/app/routes/api.php b/html/app/routes/api.php new file mode 100644 index 0000000..659c25f --- /dev/null +++ b/html/app/routes/api.php @@ -0,0 +1,64 @@ +runQuery("SELECT sku, +# max(ProductPrice_OriginalPrice) as MX, +# min(ProductPrice_OriginalPrice) as MN, +# ((max(ProductPrice_OriginalPrice)-min(ProductPrice_OriginalPrice))/max(ProductPrice_OriginalPrice)) as Di +# FROM prices +# GROUP BY sku +# ORDER BY Di desc +# LIMIT 300", +# [] +# ); +# reply_json([ +# 'success' => true, +# 'result' => $wtf +# ]); die(); +# }); + + +// route for testing... +// --- +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(); +}); -- cgit v1.2.3