Initial commit
This commit is contained in:
commit
05c65aad4d
155 changed files with 93617 additions and 0 deletions
17
viewer/admin/api/env_schema.php
Normal file
17
viewer/admin/api/env_schema.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
require __DIR__ . '/common.php';
|
||||
|
||||
$root = workspace_root();
|
||||
$p = $root . '/scripts/.env.schema.json';
|
||||
if (file_exists($p)) {
|
||||
if (isset($_GET['delete']) && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if (@unlink($p)) json_response(['ok'=>true]);
|
||||
http_response_code(500); json_response(['error'=>'delete_failed']);
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
echo file_get_contents($p);
|
||||
exit;
|
||||
}
|
||||
|
||||
http_response_code(204);
|
||||
exit;
|
||||
Loading…
Add table
Add a link
Reference in a new issue