forked from Adleraci/adlerka.top
refactor
This commit is contained in:
@@ -21,21 +21,9 @@ function getEndpoint($endpoint_name): string
|
||||
$endpoint_name = $routerRequest["page_name"];
|
||||
}
|
||||
|
||||
if($routerRequest["isToApex"]){
|
||||
$subdomain_part = "";
|
||||
}
|
||||
else{
|
||||
$subdomain_part = $routerRequest["subdomain"] . "/";
|
||||
}
|
||||
$endpoint_file = $routerConfig["endpoint_dir"] . $endpoint_name . ".php";
|
||||
|
||||
$endpoint_file = $routerConfig["endpoint_dir"] . $subdomain_part . $endpoint_name . ".php";
|
||||
|
||||
$endpoint_file_global = $routerConfig["endpoint_dir"] . "global/" . $endpoint_name . ".php";
|
||||
|
||||
if (file_exists($endpoint_file_global)){
|
||||
$output = runEndpoint($endpoint_file_global);
|
||||
}
|
||||
elseif (file_exists($endpoint_file)){
|
||||
if (file_exists($endpoint_file)){
|
||||
$output = runEndpoint($endpoint_file);
|
||||
}
|
||||
else{
|
||||
|
Reference in New Issue
Block a user