No more router(redirect:home nor page:load) only page:load by default to allow JS use

This commit is contained in:
xdrm-brackets 2017-12-04 22:55:41 +01:00
parent e0debfed54
commit dc02f564be
2 changed files with 3 additions and 11 deletions

View File

@ -24,8 +24,8 @@
* *
*/ */
public function load(){ public function load(){
if( file_exists(__ROOT__."/view/".$this->pagename.".php") ) if( file_exists(__ROOT__."/view/home.php") )
include __ROOT__."/view/".$this->pagename.".php"; include __ROOT__."/view/home.php";
else else
echo "page not found"; echo "page not found";
} }

View File

@ -26,14 +26,6 @@
"arguments": {} "arguments": {}
}, },
"/{page}/": {
"methods": ["GET"],
"controller": "page:load",
"arguments": {
"page": "[a-z]+"
}
},
"/api/v/1.0/{module}/{method}{uri_args}": { "/api/v/1.0/{module}/{method}{uri_args}": {
"methods": ["GET", "POST", "PUT", "DELETE", "VIEW"], "methods": ["GET", "POST", "PUT", "DELETE", "VIEW"],
"controller": "api:call", "controller": "api:call",
@ -46,7 +38,7 @@
"/{any}": { "/{any}": {
"methods": ["GET"], "methods": ["GET"],
"controller": "redirect:home", "controller": "page:load",
"arguments": { "arguments": {
"any": ".*" "any": ".*"
} }