Refactor API structure: update internal handling, enhance input retrieval, and improve template loading

This commit is contained in:
marc-go committed 2026-10-10 15:05:24 +02:00
1 parent a33de15f0c
commit 9cb50d7d28
13 files changed
+181 -95

No files matched your search

+4 -5
View File
@@ -13,12 +13,11 @@ require FRONTEND_PATH . "html_loader.php";
$htmlLoader = new HTMLLoader();
// Build Entry Page
$htmlLoader->setTemplate("entrys_frontend");
$htmlLoader->setPage("entrys_frontend");
$url = "http://" . APP_DOMAIN . "/api/entrys/get.php";
$response = file_get_contents($url);
$response = json_decode($response, true);
// Get entrys
$call = new APICall("entrys/get.php");
$response = $call->response;
if ($response["data"]["empty"]) {
$html_block = "<p>There aren'n any entrys yet. Be the first one!</p>";