No more router(redirect:home nor page:load) only page:load by default to allow JS use
This commit is contained in:
parent
e0debfed54
commit
dc02f564be
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
|
@ -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": ".*"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue