importer 2
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user