From dc02f564be2b3ba9188f320d5d800c7708a29e22 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 4 Dec 2017 22:55:41 +0100 Subject: [PATCH] No more router(redirect:home nor page:load) only page:load by default to allow JS use --- build/router/controller/page.php | 4 ++-- config/routes.json | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/build/router/controller/page.php b/build/router/controller/page.php index e774bd1..c54ebfd 100755 --- a/build/router/controller/page.php +++ b/build/router/controller/page.php @@ -24,8 +24,8 @@ * */ public function load(){ - if( file_exists(__ROOT__."/view/".$this->pagename.".php") ) - include __ROOT__."/view/".$this->pagename.".php"; + if( file_exists(__ROOT__."/view/home.php") ) + include __ROOT__."/view/home.php"; else echo "page not found"; } diff --git a/config/routes.json b/config/routes.json index 3dfec84..2cfe256 100755 --- a/config/routes.json +++ b/config/routes.json @@ -26,14 +26,6 @@ "arguments": {} }, - "/{page}/": { - "methods": ["GET"], - "controller": "page:load", - "arguments": { - "page": "[a-z]+" - } - }, - "/api/v/1.0/{module}/{method}{uri_args}": { "methods": ["GET", "POST", "PUT", "DELETE", "VIEW"], "controller": "api:call", @@ -46,7 +38,7 @@ "/{any}": { "methods": ["GET"], - "controller": "redirect:home", + "controller": "page:load", "arguments": { "any": ".*" }