Phase1 Bearbeitung

This commit is contained in:
2026-06-15 18:36:57 +02:00
parent e4fa714419
commit 06645f1e9c
29 changed files with 3367 additions and 300 deletions
+30 -1
View File
@@ -5,9 +5,12 @@ declare(strict_types=1);
use App\Controllers\PlatformController;
use App\Controllers\TenantController;
use App\Core\Response;
use App\Services\SecurityHeadersService;
$app = require dirname(__DIR__) . '/app/bootstrap.php';
(new SecurityHeadersService())->send();
$platform = new PlatformController(
$app['rootPath'],
$app['config'],
@@ -21,7 +24,8 @@ $tenantController = new TenantController(
$app['database'],
$app['view'],
$app['session'],
$app['csrf']
$app['csrf'],
$app['config']
);
$path = current_path();
@@ -48,6 +52,16 @@ try {
return;
}
if ($path === '/password/forgot') {
$method === 'POST' ? $platform->passwordResetRequestSubmit() : $platform->passwordResetRequestForm();
return;
}
if ($path === '/reset-password') {
$method === 'POST' ? $platform->passwordResetConfirmSubmit() : $platform->passwordResetConfirmForm();
return;
}
if ($path === '/admin' && $method === 'GET') {
$platform->adminDashboard();
return;
@@ -59,6 +73,11 @@ try {
}
if ($path === '/api/rfid/intake' && $method === 'POST') {
if (!($app['config']['rfid_ingest_enabled'] ?? false)) {
Response::notFound();
return;
}
$tenantController->rfidIngest();
return;
}
@@ -97,6 +116,16 @@ try {
return;
}
if ($subPath === 'exports/balances.csv' && $method === 'GET') {
$tenantController->exportBalances($tenantSlug);
return;
}
if ($subPath === 'exports/bookings.csv' && $method === 'GET') {
$tenantController->exportBookings($tenantSlug);
return;
}
if ($subPath === 'payments') {
$tenantController->payments($tenantSlug);
return;