forked from Adleraci/adlerka.top
13 lines
379 B
PHP
13 lines
379 B
PHP
|
<?php
|
||
|
|
||
|
require_once "lib/page.php";
|
||
|
require_once "lib/navigation.php";
|
||
|
|
||
|
function endpoint($endpoint_data): array
|
||
|
{
|
||
|
return match ($endpoint_data["action"]) {
|
||
|
"getNavigation" => getNavigationEndpoint(),
|
||
|
"getPage" => getPageEndpoint($endpoint_data["page"], $endpoint_data["site"]),
|
||
|
default => ["Status" => "Fail", "message" => "Invalid action"],
|
||
|
};
|
||
|
}
|