Boersenchecker
All checks were successful
Deploy / deploy-staging (push) Successful in 28s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-22 23:29:03 +02:00
parent 616b03474f
commit dc66f75eef
24 changed files with 5151 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
require_once dirname(__DIR__) . '/bootstrap.php';
$requestUri = (string) ($_SERVER['REQUEST_URI'] ?? '');
$requestPath = (string) (parse_url($requestUri, PHP_URL_PATH) ?: '');
$prefix = '/api/boersenchecker/index.php/';
$relativePath = trim((string) ($_GET['path'] ?? ''), '/');
if ($relativePath === '') {
$relativePath = str_starts_with($requestPath, $prefix)
? substr($requestPath, strlen($prefix))
: ltrim((string) ($_SERVER['PATH_INFO'] ?? ''), '/');
}
$normalized = strtolower(trim($relativePath, '/'));
if ($normalized === 'v1/chart-data') {
require __DIR__ . '/chart_data.php';
return;
}
http_response_code(404);
header('Content-Type: application/json; charset=utf-8');
echo json_encode([
'ok' => false,
'message' => 'Ressource nicht gefunden.',
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);