This commit is contained in:
20
api/index.php
Normal file
20
api/index.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
|
||||
require_once dirname(__DIR__) . '/config/fileload.php';
|
||||
|
||||
$action = $_GET['action'] ?? 'bootstrap';
|
||||
|
||||
if ($action === 'bootstrap') {
|
||||
echo json_encode(app_bootstrap_payload(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
exit;
|
||||
}
|
||||
|
||||
http_response_code(404);
|
||||
echo json_encode([
|
||||
'error' => 'Unknown action',
|
||||
'action' => $action,
|
||||
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
|
||||
Reference in New Issue
Block a user