importer 2
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-11 03:09:09 +02:00
parent 7400caa687
commit 35a0b10d0c
3 changed files with 214 additions and 3 deletions

View File

@@ -103,6 +103,16 @@ final class Router
], 201);
}
if ($resource === 'sql-import' && $method === 'POST') {
if (!isset($_FILES['sql_file']) || !is_array($_FILES['sql_file'])) {
throw new ApiException('Feld sql_file fehlt.', 422);
}
$this->respond([
'data' => $this->schemaManager()->importSqlFile($_FILES['sql_file']),
], 201);
}
if ($resource === 'upgrade' && $method === 'POST') {
$this->respond([
'data' => $this->schemaManager()->upgradeSchemaDirect(),